From f2b8c7106eceb681205985a9f572654106e4c951 Mon Sep 17 00:00:00 2001 From: Steven Wilde Date: Mon, 2 May 2022 18:36:19 -0500 Subject: [PATCH] Move the changes to keypad.py --- kmk/kmk_keyboard.py | 6 +----- kmk/scanners/keypad.py | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/kmk/kmk_keyboard.py b/kmk/kmk_keyboard.py index 0ed2948..8972e99 100644 --- a/kmk/kmk_keyboard.py +++ b/kmk/kmk_keyboard.py @@ -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 diff --git a/kmk/scanners/keypad.py b/kmk/scanners/keypad.py index 43da0a4..8e0bd98 100644 --- a/kmk/scanners/keypad.py +++ b/kmk/scanners/keypad.py @@ -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):