Move the changes to keypad.py

This commit is contained in:
Steven Wilde 2022-05-02 18:36:19 -05:00 committed by xs5871
parent 30252099cd
commit f2b8c7106e
2 changed files with 2 additions and 6 deletions

View File

@ -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

View File

@ -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):