Add keycode for software reload
This commit is contained in:
parent
682731bfe1
commit
d584b1f506
@ -186,6 +186,7 @@
|
||||
|Key |Description |
|
||||
|-----------------------|---------------------------------------------------------------------|
|
||||
|`KC.RESET` |Restarts the keyboard |
|
||||
|`KC.RLOAD` |Reloads the keyboard software, preserving any serial connections |
|
||||
|`KC.DEBUG` |Toggle `debug_enabled`, which enables log spew to serial console |
|
||||
|`KC.GESC` |Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC.BKDL` |Backspace when tapped, Delete when pressed with GUI |
|
||||
|
@ -27,6 +27,10 @@ def reset(*args, **kwargs):
|
||||
|
||||
microcontroller.reset()
|
||||
|
||||
def reload(*args, **kwargs):
|
||||
import supervisor
|
||||
|
||||
supervisor.reload()
|
||||
|
||||
def bootloader(*args, **kwargs):
|
||||
import microcontroller
|
||||
|
@ -131,6 +131,8 @@ class KeyAttrDict:
|
||||
make_key(code=30 + offset, names=names)
|
||||
elif key in ('RESET',):
|
||||
make_key(names=('RESET',), on_press=handlers.reset)
|
||||
elif key in ('RELOAD',):
|
||||
make_key(names=('RELOAD',), on_press=handlers.reload)
|
||||
elif key in ('BOOTLOADER',):
|
||||
make_key(names=('BOOTLOADER',), on_press=handlers.bootloader)
|
||||
elif key in ('DEBUG', 'DBG'):
|
||||
|
Loading…
Reference in New Issue
Block a user