fix(lua): handle ENTER_LONG properly (#2353)

Fixes #2267
This commit is contained in:
Raphael Coeffic
2022-09-26 09:49:51 +10:00
committed by GitHub
parent 3563e917c6
commit c2451085ec
+5
View File
@@ -51,6 +51,11 @@ void LuaEventHandler::event_cb(lv_event_t* e)
win->onEvent(EVT_ROTARY_RIGHT);
}
}
else if (code == LV_EVENT_LONG_PRESSED) {
// Do not use `lv_indev_wait_release()` as some LUA scripts
// rely on EVT_KEY_BREAK(KEY_ENTER) being generated on key release
luaPushEvent(EVT_KEY_LONG(KEY_ENTER));
}
#if defined(HARDWARE_TOUCH)
else if (code == LV_EVENT_PRESSED || code == LV_EVENT_PRESSING) {