Very broken, but some work done probably

This commit is contained in:
Kyle Brown
2018-09-21 17:22:03 -07:00
committed by Josh Klar
parent d0f35100b3
commit 7ae2d18e45
9 changed files with 63 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ from kmk.common.consts import DiodeOrientation
class MatrixScanner(AbstractMatrixScanner):
def __init__(self, cols, rows, diode_orientation=DiodeOrientation.COLUMNS):
def __init__(self, cols, rows, active_layers, diode_orientation=DiodeOrientation.COLUMNS):
# A pin cannot be both a row and column, detect this by combining the
# two tuples into a set and validating that the length did not drop
#
@@ -19,6 +19,7 @@ class MatrixScanner(AbstractMatrixScanner):
self.cols = [machine.Pin(pin) for pin in cols]
self.rows = [machine.Pin(pin) for pin in rows]
self.diode_orientation = diode_orientation
self.active_layers = active_layers
if self.diode_orientation == DiodeOrientation.COLUMNS:
self.outputs = self.cols

View File

@@ -59,8 +59,8 @@ class HIDHelper:
self.add_key(action['keycode'])
self.send()
else:
self.logger.warning('Should be processing')
internal_keycodes.process(self, state, action['keycode'])
self.logger.warning('Triggering KMK keycodes')
internal_keycodes.process(self, state, action)
elif action['type'] == KEY_UP_EVENT:
# If keycode is 1000 or over, these are internal keys
if action['keycode'].code < 1000: