[NV14] Use trim hats to emulate key events when standalone lua script running (#985)
* Preliminary trims as keys for lua Largely based on open-flysky implementation * Add `isLuaStandaloneRunning()` * Add more virtual events * Tweak virtual events further * Finish remapping keys to virtual events * Move some virtuals to right trim hat * Add missing "defined" * Revert to common EVT_VIRTUAL_MENU mapping * Make keys/trims reset backlight like other radios
This commit is contained in:
@@ -2040,6 +2040,9 @@ const luaR_value_entry opentxConstants[] = {
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
{ "EVT_VIRTUAL_PREV_PAGE", EVT_KEY_BREAK(KEY_PGUP) },
|
||||
{ "EVT_VIRTUAL_NEXT_PAGE", EVT_KEY_BREAK(KEY_PGDN) },
|
||||
#elif defined(PCBNV14)
|
||||
{ "EVT_VIRTUAL_PREV_PAGE", EVT_KEY_BREAK(KEY_LEFT) },
|
||||
{ "EVT_VIRTUAL_NEXT_PAGE", EVT_KEY_BREAK(KEY_RIGHT) },
|
||||
#else
|
||||
{ "EVT_VIRTUAL_PREV_PAGE", EVT_KEY_LONG(KEY_PGDN) },
|
||||
{ "EVT_VIRTUAL_NEXT_PAGE", EVT_KEY_BREAK(KEY_PGDN) },
|
||||
|
||||
Reference in New Issue
Block a user