From 00899d1b0f8a657d4d44d4067862fb673f0d4d57 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Thu, 11 Oct 2018 18:02:13 -0700 Subject: [PATCH] Resolves #56 by moving kmk.common.* up a level to kmk.* --- Makefile | 2 +- bin/keymap_sanity_check.py | 2 +- kmk/{common => abstract}/__init__.py | 0 kmk/{common => }/abstract/hid.py | 8 ++++---- kmk/circuitpython/hid.py | 5 ++--- kmk/common/macros/__init__.py | 0 kmk/{common => }/consts.py | 0 kmk/entrypoints/handwire/feather_m4_express.py | 4 ++-- kmk/entrypoints/handwire/itsybitsy_m4_express.py | 4 ++-- kmk/entrypoints/handwire/pyboard.py | 2 +- kmk/{common => }/event_defs.py | 4 ++-- kmk/firmware.py | 6 +++--- kmk/{common => }/internal_state.py | 16 +++++++--------- kmk/{common => }/keycodes.py | 4 ++-- kmk/{common => }/kmktime.py | 0 kmk/{common => }/leader_mode.py | 2 +- kmk/{common/abstract => macros}/__init__.py | 0 kmk/{common => }/macros/rotary_encoder.py | 8 ++++---- kmk/{common => }/macros/simple.py | 8 ++++---- kmk/{common => }/macros/unicode.py | 12 ++++++------ kmk/{common => }/matrix.py | 4 ++-- kmk/micropython/pyb_hid.py | 4 ++-- kmk/{common => }/pins.py | 2 +- kmk/{common => }/rotary_encoder.py | 2 +- kmk/{common => }/types.py | 0 kmk/{common => }/util.py | 0 tests/test_data/keymaps/duplicate_row_pins.py | 4 ++-- .../keymaps/duplicated_pins_between_row_col.py | 4 ++-- tests/test_data/keymaps/ghosted_layer_mo.py | 4 ++-- tests/test_data/keymaps/known_good.py | 4 ++-- user_keymaps/kdb424/handwire_planck_featherm4.py | 12 ++++++------ user_keymaps/kdb424/handwire_planck_pyboard.py | 12 ++++++------ .../klardotsh/feather_m4_express/fourfour.py | 10 +++++----- .../klardotsh/itsybitsy_m4_express/threethree.py | 14 +++++++------- .../klardotsh/threethree_matrix_pyboard.py | 10 +++++----- 35 files changed, 85 insertions(+), 88 deletions(-) rename kmk/{common => abstract}/__init__.py (100%) rename kmk/{common => }/abstract/hid.py (95%) delete mode 100644 kmk/common/macros/__init__.py rename kmk/{common => }/consts.py (100%) rename kmk/{common => }/event_defs.py (97%) rename kmk/{common => }/internal_state.py (96%) rename kmk/{common => }/keycodes.py (99%) rename kmk/{common => }/kmktime.py (100%) rename kmk/{common => }/leader_mode.py (98%) rename kmk/{common/abstract => macros}/__init__.py (100%) rename kmk/{common => }/macros/rotary_encoder.py (89%) rename kmk/{common => }/macros/simple.py (84%) rename kmk/{common => }/macros/unicode.py (90%) rename kmk/{common => }/matrix.py (95%) rename kmk/{common => }/pins.py (97%) rename kmk/{common => }/rotary_encoder.py (98%) rename kmk/{common => }/types.py (100%) rename kmk/{common => }/util.py (100%) diff --git a/Makefile b/Makefile index 5e633f6..f79d8ef 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ lint: devdeps @$(PIPENV) run flake8 fix-isort: devdeps - @find kmk/ user_keymaps/ -name "*.py" | xargs $(PIPENV) run isort + @find kmk/ tests/ user_keymaps/ -name "*.py" | xargs $(PIPENV) run isort clean: clean-build-log @echo "===> Cleaning build artifacts" diff --git a/bin/keymap_sanity_check.py b/bin/keymap_sanity_check.py index 121152d..6663a3b 100755 --- a/bin/keymap_sanity_check.py +++ b/bin/keymap_sanity_check.py @@ -4,7 +4,7 @@ import sys import uos -from kmk.common.keycodes import Keycodes, RawKeycodes +from kmk.keycodes import Keycodes, RawKeycodes if len(sys.argv) < 2: print('Must provide a keymap to test as first argument', file=sys.stderr) diff --git a/kmk/common/__init__.py b/kmk/abstract/__init__.py similarity index 100% rename from kmk/common/__init__.py rename to kmk/abstract/__init__.py diff --git a/kmk/common/abstract/hid.py b/kmk/abstract/hid.py similarity index 95% rename from kmk/common/abstract/hid.py rename to kmk/abstract/hid.py index ef77831..e6d8507 100644 --- a/kmk/common/abstract/hid.py +++ b/kmk/abstract/hid.py @@ -1,9 +1,9 @@ import logging -from kmk.common.consts import HIDReportTypes -from kmk.common.event_defs import HID_REPORT_EVENT -from kmk.common.keycodes import (FIRST_KMK_INTERNAL_KEYCODE, ConsumerKeycode, - ModifierKeycode) +from kmk.consts import HIDReportTypes +from kmk.event_defs import HID_REPORT_EVENT +from kmk.keycodes import (FIRST_KMK_INTERNAL_KEYCODE, ConsumerKeycode, + ModifierKeycode) class AbstractHidHelper: diff --git a/kmk/circuitpython/hid.py b/kmk/circuitpython/hid.py index c86b0b5..281521d 100644 --- a/kmk/circuitpython/hid.py +++ b/kmk/circuitpython/hid.py @@ -1,7 +1,6 @@ import usb_hid -from kmk.common.abstract.hid import AbstractHidHelper -from kmk.common.consts import (HID_REPORT_SIZES, HIDReportTypes, HIDUsage, - HIDUsagePage) +from kmk.abstract.hid import AbstractHidHelper +from kmk.consts import HID_REPORT_SIZES, HIDReportTypes, HIDUsage, HIDUsagePage class HIDHelper(AbstractHidHelper): diff --git a/kmk/common/macros/__init__.py b/kmk/common/macros/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/kmk/common/consts.py b/kmk/consts.py similarity index 100% rename from kmk/common/consts.py rename to kmk/consts.py diff --git a/kmk/entrypoints/handwire/feather_m4_express.py b/kmk/entrypoints/handwire/feather_m4_express.py index 64773ab..52f3270 100644 --- a/kmk/entrypoints/handwire/feather_m4_express.py +++ b/kmk/entrypoints/handwire/feather_m4_express.py @@ -1,9 +1,9 @@ import sys from kmk.circuitpython.hid import HIDHelper -from kmk.common.consts import UnicodeModes -from kmk.common.matrix import MatrixScanner +from kmk.consts import UnicodeModes from kmk.firmware import Firmware +from kmk.matrix import MatrixScanner def main(): diff --git a/kmk/entrypoints/handwire/itsybitsy_m4_express.py b/kmk/entrypoints/handwire/itsybitsy_m4_express.py index 64773ab..52f3270 100644 --- a/kmk/entrypoints/handwire/itsybitsy_m4_express.py +++ b/kmk/entrypoints/handwire/itsybitsy_m4_express.py @@ -1,9 +1,9 @@ import sys from kmk.circuitpython.hid import HIDHelper -from kmk.common.consts import UnicodeModes -from kmk.common.matrix import MatrixScanner +from kmk.consts import UnicodeModes from kmk.firmware import Firmware +from kmk.matrix import MatrixScanner def main(): diff --git a/kmk/entrypoints/handwire/pyboard.py b/kmk/entrypoints/handwire/pyboard.py index 8749002..7ea1375 100644 --- a/kmk/entrypoints/handwire/pyboard.py +++ b/kmk/entrypoints/handwire/pyboard.py @@ -2,8 +2,8 @@ import sys import gc -from kmk.common.matrix import MatrixScanner from kmk.firmware import Firmware +from kmk.matrix import MatrixScanner from kmk.micropython.pyb_hid import HIDHelper diff --git a/kmk/common/event_defs.py b/kmk/event_defs.py similarity index 97% rename from kmk/common/event_defs.py rename to kmk/event_defs.py index a7b025a..5c2678a 100644 --- a/kmk/common/event_defs.py +++ b/kmk/event_defs.py @@ -3,8 +3,8 @@ from collections import namedtuple from micropython import const -from kmk.common.keycodes import Keycodes -from kmk.common.util import reset_bootloader +from kmk.keycodes import Keycodes +from kmk.util import reset_bootloader KEY_UP_EVENT = const(1) KEY_DOWN_EVENT = const(2) diff --git a/kmk/firmware.py b/kmk/firmware.py index 7aaddb6..522c036 100644 --- a/kmk/firmware.py +++ b/kmk/firmware.py @@ -1,8 +1,8 @@ import logging -from kmk.common.event_defs import init_firmware -from kmk.common.internal_state import Store, kmk_reducer -from kmk.common.leader_mode import LeaderHelper +from kmk.event_defs import init_firmware +from kmk.internal_state import Store, kmk_reducer +from kmk.leader_mode import LeaderHelper class Firmware: diff --git a/kmk/common/internal_state.py b/kmk/internal_state.py similarity index 96% rename from kmk/common/internal_state.py rename to kmk/internal_state.py index 9dc3014..5f7f90f 100644 --- a/kmk/common/internal_state.py +++ b/kmk/internal_state.py @@ -1,15 +1,13 @@ import logging import sys -from kmk.common import kmktime -from kmk.common.consts import DiodeOrientation, LeaderMode, UnicodeModes -from kmk.common.event_defs import (HID_REPORT_EVENT, INIT_FIRMWARE_EVENT, - KEY_DOWN_EVENT, KEY_UP_EVENT, - KEYCODE_DOWN_EVENT, KEYCODE_UP_EVENT, - MACRO_COMPLETE_EVENT, NEW_MATRIX_EVENT, - PENDING_KEYCODE_POP_EVENT) -from kmk.common.keycodes import (FIRST_KMK_INTERNAL_KEYCODE, Keycodes, - RawKeycodes) +from kmk import kmktime +from kmk.consts import DiodeOrientation, LeaderMode, UnicodeModes +from kmk.event_defs import (HID_REPORT_EVENT, INIT_FIRMWARE_EVENT, + KEY_DOWN_EVENT, KEY_UP_EVENT, KEYCODE_DOWN_EVENT, + KEYCODE_UP_EVENT, MACRO_COMPLETE_EVENT, + NEW_MATRIX_EVENT, PENDING_KEYCODE_POP_EVENT) +from kmk.keycodes import FIRST_KMK_INTERNAL_KEYCODE, Keycodes, RawKeycodes GESC_TRIGGERS = { Keycodes.Modifiers.KC_LSHIFT, Keycodes.Modifiers.KC_RSHIFT, diff --git a/kmk/common/keycodes.py b/kmk/keycodes.py similarity index 99% rename from kmk/common/keycodes.py rename to kmk/keycodes.py index 99571c3..2341c30 100644 --- a/kmk/common/keycodes.py +++ b/kmk/keycodes.py @@ -5,8 +5,8 @@ except ImportError: # MicroPython, it doesn't exist from ucollections import namedtuple -from kmk.common.consts import UnicodeModes -from kmk.common.types import AttrDict +from kmk.consts import UnicodeModes +from kmk.types import AttrDict FIRST_KMK_INTERNAL_KEYCODE = 1000 diff --git a/kmk/common/kmktime.py b/kmk/kmktime.py similarity index 100% rename from kmk/common/kmktime.py rename to kmk/kmktime.py diff --git a/kmk/common/leader_mode.py b/kmk/leader_mode.py similarity index 98% rename from kmk/common/leader_mode.py rename to kmk/leader_mode.py index d5fab75..d638ab0 100644 --- a/kmk/common/leader_mode.py +++ b/kmk/leader_mode.py @@ -1,6 +1,6 @@ import logging -from kmk.common.keycodes import Keycodes +from kmk.keycodes import Keycodes class LeaderHelper: diff --git a/kmk/common/abstract/__init__.py b/kmk/macros/__init__.py similarity index 100% rename from kmk/common/abstract/__init__.py rename to kmk/macros/__init__.py diff --git a/kmk/common/macros/rotary_encoder.py b/kmk/macros/rotary_encoder.py similarity index 89% rename from kmk/common/macros/rotary_encoder.py rename to kmk/macros/rotary_encoder.py index c3bb65d..68abc8e 100644 --- a/kmk/common/macros/rotary_encoder.py +++ b/kmk/macros/rotary_encoder.py @@ -1,9 +1,9 @@ import math -from kmk.common.event_defs import (hid_report_event, keycode_down_event, - keycode_up_event) -from kmk.common.keycodes import Media -from kmk.common.rotary_encoder import RotaryEncoder +from kmk.event_defs import (hid_report_event, keycode_down_event, + keycode_up_event) +from kmk.keycodes import Media +from kmk.rotary_encoder import RotaryEncoder VAL_FALSE = False + 1 VAL_NONE = True + 2 diff --git a/kmk/common/macros/simple.py b/kmk/macros/simple.py similarity index 84% rename from kmk/common/macros/simple.py rename to kmk/macros/simple.py index a0f6a35..69b1a1a 100644 --- a/kmk/common/macros/simple.py +++ b/kmk/macros/simple.py @@ -1,9 +1,9 @@ import string -from kmk.common.event_defs import (hid_report_event, keycode_down_event, - keycode_up_event) -from kmk.common.keycodes import Keycodes, Macro, RawKeycodes, char_lookup -from kmk.common.kmktime import sleep_ms +from kmk.event_defs import (hid_report_event, keycode_down_event, + keycode_up_event) +from kmk.keycodes import Keycodes, Macro, RawKeycodes, char_lookup +from kmk.kmktime import sleep_ms kc_lookup_cache = {} diff --git a/kmk/common/macros/unicode.py b/kmk/macros/unicode.py similarity index 90% rename from kmk/common/macros/unicode.py rename to kmk/macros/unicode.py index bbe7b99..434cba6 100644 --- a/kmk/common/macros/unicode.py +++ b/kmk/macros/unicode.py @@ -1,9 +1,9 @@ -from kmk.common.consts import UnicodeModes -from kmk.common.event_defs import (hid_report_event, keycode_down_event, - keycode_up_event) -from kmk.common.keycodes import Common, Macro, Modifiers -from kmk.common.macros.simple import lookup_kc_with_cache, simple_key_sequence -from kmk.common.util import get_wide_ordinal +from kmk.consts import UnicodeModes +from kmk.event_defs import (hid_report_event, keycode_down_event, + keycode_up_event) +from kmk.keycodes import Common, Macro, Modifiers +from kmk.macros.simple import lookup_kc_with_cache, simple_key_sequence +from kmk.util import get_wide_ordinal IBUS_KEY_COMBO = Modifiers.KC_LCTRL(Modifiers.KC_LSHIFT(Common.KC_U)) IBUS_KEY_DOWN = keycode_down_event(IBUS_KEY_COMBO) diff --git a/kmk/common/matrix.py b/kmk/matrix.py similarity index 95% rename from kmk/common/matrix.py rename to kmk/matrix.py index 297002b..0ef14e7 100644 --- a/kmk/common/matrix.py +++ b/kmk/matrix.py @@ -1,7 +1,7 @@ import digitalio -from kmk.common.consts import DiodeOrientation -from kmk.common.event_defs import matrix_changed +from kmk.consts import DiodeOrientation +from kmk.event_defs import matrix_changed class MatrixScanner: diff --git a/kmk/micropython/pyb_hid.py b/kmk/micropython/pyb_hid.py index 4144e09..2764277 100644 --- a/kmk/micropython/pyb_hid.py +++ b/kmk/micropython/pyb_hid.py @@ -1,7 +1,7 @@ from pyb import USB_HID, delay, hid_keyboard -from kmk.common.abstract.hid import AbstractHidHelper -from kmk.common.consts import HID_REPORT_STRUCTURE +from kmk.abstract.hid import AbstractHidHelper +from kmk.consts import HID_REPORT_STRUCTURE def generate_pyb_hid_descriptor(): diff --git a/kmk/common/pins.py b/kmk/pins.py similarity index 97% rename from kmk/common/pins.py rename to kmk/pins.py index 18974b1..15a9d5b 100644 --- a/kmk/common/pins.py +++ b/kmk/pins.py @@ -1,6 +1,6 @@ from micropython import const -from kmk.common.consts import CIRCUITPYTHON, MICROPYTHON +from kmk.consts import CIRCUITPYTHON, MICROPYTHON PULL_UP = const(1) PULL_DOWN = const(2) diff --git a/kmk/common/rotary_encoder.py b/kmk/rotary_encoder.py similarity index 98% rename from kmk/common/rotary_encoder.py rename to kmk/rotary_encoder.py index 96a71ab..96fe278 100644 --- a/kmk/common/rotary_encoder.py +++ b/kmk/rotary_encoder.py @@ -1,4 +1,4 @@ -from kmk.common.pins import PULL_UP +from kmk.pins import PULL_UP class RotaryEncoder: diff --git a/kmk/common/types.py b/kmk/types.py similarity index 100% rename from kmk/common/types.py rename to kmk/types.py diff --git a/kmk/common/util.py b/kmk/util.py similarity index 100% rename from kmk/common/util.py rename to kmk/util.py diff --git a/tests/test_data/keymaps/duplicate_row_pins.py b/tests/test_data/keymaps/duplicate_row_pins.py index aea8f23..62d7c59 100644 --- a/tests/test_data/keymaps/duplicate_row_pins.py +++ b/tests/test_data/keymaps/duplicate_row_pins.py @@ -1,8 +1,8 @@ import machine -from kmk.common.consts import DiodeOrientation -from kmk.common.keycodes import KC +from kmk.consts import DiodeOrientation from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC p = machine.Pin.board cols = (p.X10, p.X10, p.X12) diff --git a/tests/test_data/keymaps/duplicated_pins_between_row_col.py b/tests/test_data/keymaps/duplicated_pins_between_row_col.py index 25624e6..c31ed64 100644 --- a/tests/test_data/keymaps/duplicated_pins_between_row_col.py +++ b/tests/test_data/keymaps/duplicated_pins_between_row_col.py @@ -1,8 +1,8 @@ import machine -from kmk.common.consts import DiodeOrientation -from kmk.common.keycodes import KC +from kmk.consts import DiodeOrientation from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC p = machine.Pin.board cols = (p.X10, p.X11, p.X12) diff --git a/tests/test_data/keymaps/ghosted_layer_mo.py b/tests/test_data/keymaps/ghosted_layer_mo.py index 658f838..445284e 100644 --- a/tests/test_data/keymaps/ghosted_layer_mo.py +++ b/tests/test_data/keymaps/ghosted_layer_mo.py @@ -1,8 +1,8 @@ import machine -from kmk.common.consts import DiodeOrientation -from kmk.common.keycodes import KC +from kmk.consts import DiodeOrientation from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC p = machine.Pin.board cols = (p.X10, p.X11, p.X12) diff --git a/tests/test_data/keymaps/known_good.py b/tests/test_data/keymaps/known_good.py index f95d0db..74281c9 100644 --- a/tests/test_data/keymaps/known_good.py +++ b/tests/test_data/keymaps/known_good.py @@ -1,8 +1,8 @@ import machine -from kmk.common.consts import DiodeOrientation -from kmk.common.keycodes import KC +from kmk.consts import DiodeOrientation from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC p = machine.Pin.board cols = (p.X10, p.X11, p.X12) diff --git a/user_keymaps/kdb424/handwire_planck_featherm4.py b/user_keymaps/kdb424/handwire_planck_featherm4.py index 187bdcb..d4686e0 100644 --- a/user_keymaps/kdb424/handwire_planck_featherm4.py +++ b/user_keymaps/kdb424/handwire_planck_featherm4.py @@ -1,10 +1,10 @@ -from kmk.common.consts import DiodeOrientation, UnicodeModes -from kmk.common.keycodes import KC -from kmk.common.macros.simple import send_string -from kmk.common.macros.unicode import unicode_string_sequence -from kmk.common.pins import Pin as P -from kmk.common.types import AttrDict +from kmk.consts import DiodeOrientation, UnicodeModes from kmk.entrypoints.handwire.feather_m4_express import main +from kmk.keycodes import KC +from kmk.macros.simple import send_string +from kmk.macros.unicode import unicode_string_sequence +from kmk.pins import Pin as P +from kmk.types import AttrDict cols = (P.A0, P.A1, P.A2, P.A3, P.A4, P.A5, P.SCK, P.MOSI, P.MISO, P.RX, P.TX, P.D4) rows = (P.D10, P.D11, P.D12, P.D13) diff --git a/user_keymaps/kdb424/handwire_planck_pyboard.py b/user_keymaps/kdb424/handwire_planck_pyboard.py index 6204e85..589a16a 100644 --- a/user_keymaps/kdb424/handwire_planck_pyboard.py +++ b/user_keymaps/kdb424/handwire_planck_pyboard.py @@ -1,12 +1,12 @@ import gc -from kmk.common.consts import DiodeOrientation, UnicodeModes -from kmk.common.keycodes import KC -from kmk.common.macros.simple import send_string -from kmk.common.macros.unicode import unicode_string_sequence -from kmk.common.pins import Pin as P -from kmk.common.types import AttrDict +from kmk.consts import DiodeOrientation, UnicodeModes from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC +from kmk.macros.simple import send_string +from kmk.macros.unicode import unicode_string_sequence +from kmk.pins import Pin as P +from kmk.types import AttrDict cols = (P.Y12, P.Y11, P.Y10, P.Y9, P.X8, P.X7, P.X6, P.X5, P.X4, P.X3, P.X2, P.X1) rows = (P.Y1, P.Y2, P.Y3, P.Y4) diff --git a/user_keymaps/klardotsh/feather_m4_express/fourfour.py b/user_keymaps/klardotsh/feather_m4_express/fourfour.py index 68b062d..79ee33c 100644 --- a/user_keymaps/klardotsh/feather_m4_express/fourfour.py +++ b/user_keymaps/klardotsh/feather_m4_express/fourfour.py @@ -1,10 +1,10 @@ -from kmk.common.consts import DiodeOrientation, UnicodeModes -from kmk.common.keycodes import KC -from kmk.common.macros.simple import send_string, simple_key_sequence -from kmk.common.macros.unicode import unicode_codepoint_sequence -from kmk.common.pins import Pin as P +from kmk.consts import DiodeOrientation, UnicodeModes from kmk.entrypoints.handwire.feather_m4_express import main from kmk.firmware import Firmware +from kmk.keycodes import KC +from kmk.macros.simple import send_string, simple_key_sequence +from kmk.macros.unicode import unicode_codepoint_sequence +from kmk.pins import Pin as P cols = (P.D11, P.D10, P.D9) rows = (P.A2, P.A3, P.A4, P.A5) diff --git a/user_keymaps/klardotsh/itsybitsy_m4_express/threethree.py b/user_keymaps/klardotsh/itsybitsy_m4_express/threethree.py index 3166ff9..9c1a2d6 100644 --- a/user_keymaps/klardotsh/itsybitsy_m4_express/threethree.py +++ b/user_keymaps/klardotsh/itsybitsy_m4_express/threethree.py @@ -1,12 +1,12 @@ -from kmk.common.consts import DiodeOrientation, UnicodeModes -from kmk.common.keycodes import KC -from kmk.common.macros.rotary_encoder import VolumeRotaryEncoder -from kmk.common.macros.simple import send_string, simple_key_sequence -from kmk.common.macros.unicode import unicode_string_sequence -from kmk.common.pins import Pin as P -from kmk.common.types import AttrDict +from kmk.consts import DiodeOrientation, UnicodeModes from kmk.entrypoints.handwire.itsybitsy_m4_express import main from kmk.firmware import Firmware +from kmk.keycodes import KC +from kmk.macros.rotary_encoder import VolumeRotaryEncoder +from kmk.macros.simple import send_string, simple_key_sequence +from kmk.macros.unicode import unicode_string_sequence +from kmk.pins import Pin as P +from kmk.types import AttrDict DEBUG_ENABLE = True diff --git a/user_keymaps/klardotsh/threethree_matrix_pyboard.py b/user_keymaps/klardotsh/threethree_matrix_pyboard.py index 0ee5682..2a6f389 100644 --- a/user_keymaps/klardotsh/threethree_matrix_pyboard.py +++ b/user_keymaps/klardotsh/threethree_matrix_pyboard.py @@ -1,9 +1,9 @@ -from kmk.common.consts import DiodeOrientation, UnicodeModes -from kmk.common.keycodes import KC -from kmk.common.macros.simple import send_string, simple_key_sequence -from kmk.common.macros.unicode import unicode_codepoint_sequence -from kmk.common.pins import Pin as P +from kmk.consts import DiodeOrientation, UnicodeModes from kmk.entrypoints.handwire.pyboard import main +from kmk.keycodes import KC +from kmk.macros.simple import send_string, simple_key_sequence +from kmk.macros.unicode import unicode_codepoint_sequence +from kmk.pins import Pin as P cols = (P.X10, P.X11, P.X12) rows = (P.X1, P.X2, P.X3)