Start of internal keycodes

This commit is contained in:
Kyle Brown
2018-09-21 12:57:29 -07:00
committed by Josh Klar
parent f84c58a03e
commit d0f35100b3
5 changed files with 43 additions and 14 deletions

View File

@@ -0,0 +1,11 @@
def process(self, state, key):
self.logger.warning(key)
if key.code == 1000:
reset(self)
def reset(self):
self.logger.debug('Rebooting to bootloader')
import machine
machine.bootloader()
return self

View File

@@ -312,6 +312,15 @@ class Keycodes(KeycodeCategory):
KC_MEDIA_FAST_FORWARD = KC_MFFD = Keycode(187, False)
KC_MEDIA_REWIND = KC_MRWD = Keycode(189, False)
class KMK(KeycodeCategory):
KC_RESET = Keycode(1000, False)
KC_DEBUG = Keycode(1001, False)
KC_GESC = Keycode(1002, False)
KC_LSPO = Keycode(1003, False)
KC_RSPC = Keycode(1004, False)
KC_LEAD = Keycode(1005, False)
KC_LOCK = Keycode(1006, False)
ALL_KEYS = KC = AttrDict({
k.replace('KC_', ''): v