Resolves #56 by moving kmk.common.* up a level to kmk.*
This commit is contained in:
@@ -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:
|
@@ -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):
|
||||
|
@@ -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():
|
||||
|
@@ -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():
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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)
|
@@ -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:
|
||||
|
@@ -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,
|
@@ -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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
|
||||
from kmk.common.keycodes import Keycodes
|
||||
from kmk.keycodes import Keycodes
|
||||
|
||||
|
||||
class LeaderHelper:
|
@@ -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
|
@@ -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 = {}
|
||||
|
@@ -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)
|
@@ -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:
|
@@ -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():
|
||||
|
@@ -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)
|
@@ -1,4 +1,4 @@
|
||||
from kmk.common.pins import PULL_UP
|
||||
from kmk.pins import PULL_UP
|
||||
|
||||
|
||||
class RotaryEncoder:
|
Reference in New Issue
Block a user