[python/modion] Allow interruption of modion_keyboard_keydown

This commit is contained in:
Léa Saviot
2020-02-25 14:25:30 +01:00
committed by EmilieNumworks
parent c377491c7f
commit 383aafcc55

View File

@@ -9,5 +9,6 @@ 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();
micropython_port_interrupt_if_needed();
return mp_obj_new_bool(state.keyDown(key));
}