Handle macros more consistently: make them a proper internal keycode-style object and not a weird one-off. Fixes sanity_checker on my keymaps.

This commit is contained in:
Josh Klar committed 2018-10-01 11:54:43 -07:00
1 parent 27d1ee8755
commit 552e848a27
7 files changed
+38 -30

No files matched your search

+1 -2
View File
@@ -6,7 +6,6 @@ from kmk.common.consts import HID_REPORT_STRUCTURE, HIDReportTypes
from kmk.common.event_defs import HID_REPORT_EVENT
from kmk.common.keycodes import (FIRST_KMK_INTERNAL_KEYCODE, ConsumerKeycode,
ModifierKeycode)
from kmk.common.macros import KMKMacro
def generate_pyb_hid_descriptor():
@@ -72,7 +71,7 @@ class HIDHelper:
self.add_key(consumer_key)
else:
for key in state.keys_pressed:
if isinstance(key, KMKMacro) or key.code >= FIRST_KMK_INTERNAL_KEYCODE:
if key.code >= FIRST_KMK_INTERNAL_KEYCODE:
continue
if isinstance(key, ModifierKeycode):