kmk_firmware/kmk/common/event_defs.py

19 lines
297 B
Python

from micropython import const
KEY_UP_EVENT = const(1)
KEY_DOWN_EVENT = const(2)
def key_up_event(keycode):
return {
'type': KEY_UP_EVENT,
'keycode': keycode,
}
def key_down_event(keycode):
return {
'type': KEY_DOWN_EVENT,
'keycode': keycode,
}