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
2018-10-01 11:52:47 -07:00
parent 27d1ee8755
commit 552e848a27
7 changed files with 38 additions and 30 deletions

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