mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 00:00:44 +01:00
[python/modion] Use constants to identify keys
This commit is contained in:
committed by
LeaNumworks
parent
9d66b23848
commit
7607c4cba4
@@ -9,5 +9,5 @@ extern "C" {
|
||||
mp_obj_t modion_keyboard_keydown(mp_obj_t key_o) {
|
||||
Ion::Keyboard::Key key = static_cast<Ion::Keyboard::Key>(mp_obj_get_int(key_o));
|
||||
Ion::Keyboard::State state = Ion::Keyboard::scan();
|
||||
return MP_OBJ_NEW_SMALL_INT(state.keyDown(key));
|
||||
return mp_obj_new_bool(state.keyDown(key));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user