refactor: key handling (#4849)

This commit is contained in:
philmoz
2024-05-27 18:33:53 +10:00
committed by GitHub
parent b8a0038c68
commit e807ccbebf
101 changed files with 380 additions and 578 deletions
@@ -166,7 +166,6 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
#else
if (menuHorizontalPosition<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) {
#endif
killEvents(event);
CustomFunctionData *cfn = &functions[sub];
if (!CFN_EMPTY(cfn))
POPUP_MENU_ADD_ITEM(STR_COPY);
@@ -416,7 +415,6 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
#if !defined(NAVIGATION_X7)
// For X7 type navigation the ENTER long press is handled below
if (attr && event==EVT_KEY_LONG(KEY_ENTER)) {
killEvents(event);
s_editMode = !s_editMode;
active = true;
CFN_GVAR_MODE(cfn) += 1;
@@ -433,7 +431,6 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
if (active || event==EVT_KEY_LONG(KEY_ENTER)) {
CFN_PARAM(cfn) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max);
if (func == FUNC_ADJUST_GVAR && attr && event==EVT_KEY_LONG(KEY_ENTER)) {
killEvents(event);
if (CFN_GVAR_MODE(cfn) != FUNC_ADJUST_GVAR_CONSTANT)
POPUP_MENU_ADD_ITEM(STR_CONSTANT);
if (CFN_GVAR_MODE(cfn) != FUNC_ADJUST_GVAR_SOURCE)