Add missing keycode
This commit is contained in:
@@ -137,3 +137,10 @@ def ble_disconnect(key, keyboard, *args, **kwargs):
|
||||
|
||||
keyboard._hid_helper.clear_bonds()
|
||||
return keyboard
|
||||
|
||||
|
||||
def any_pressed(key, keyboard, *args, **kwargs):
|
||||
from random import randint
|
||||
|
||||
key.code = randint(4, 56)
|
||||
default_pressed(key, keyboard, *args, **kwargs)
|
||||
|
@@ -370,6 +370,7 @@ def maybe_make_firmware_key(candidate: str) -> Optional[Key]:
|
||||
((('HID_SWITCH', 'HID'), handlers.hid_switch)),
|
||||
((('RELOAD', 'RLD'), handlers.reload)),
|
||||
((('RESET',), handlers.reset)),
|
||||
((('ANY',), handlers.any_pressed)),
|
||||
)
|
||||
|
||||
for names, handler in keys:
|
||||
|
Reference in New Issue
Block a user