Move the changes to keypad.py
This commit is contained in:
parent
30252099cd
commit
f2b8c7106e
@ -1,7 +1,5 @@
|
||||
from supervisor import ticks_ms
|
||||
|
||||
from keypad import Event as KeyEvent
|
||||
|
||||
from kmk.consts import KMK_RELEASE, UnicodeMode
|
||||
from kmk.hid import BLEHID, USBHID, AbstractHID, HIDModes
|
||||
from kmk.keys import KC
|
||||
@ -504,9 +502,7 @@ class KMKKeyboard:
|
||||
for matrix in self.matrix:
|
||||
update = matrix.scan_for_changes()
|
||||
if update:
|
||||
self.matrix_update = KeyEvent(
|
||||
key_number=update.key_number, pressed=update.pressed
|
||||
)
|
||||
self.matrix_update = update
|
||||
break
|
||||
self.sandbox.secondary_matrix_update = self.secondary_matrix_update
|
||||
|
||||
|
@ -30,7 +30,7 @@ class KeypadScanner(Scanner):
|
||||
if self.offset:
|
||||
return keypad.Event(ev.key_number + self.offset, ev.pressed)
|
||||
else:
|
||||
return ev
|
||||
return keypad.Event(ev.key_number, ev.pressed)
|
||||
|
||||
|
||||
class MatrixScanner(KeypadScanner):
|
||||
|
Loading…
Reference in New Issue
Block a user