Add debug hooks to the event dispatcher, remove explicit prints
This commit is contained in:
18
kmk/common/event_defs.py
Normal file
18
kmk/common/event_defs.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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,
|
||||
}
|
Reference in New Issue
Block a user