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
@@ -155,7 +155,6 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
int sub = menuVerticalPosition;
uint8_t eeFlags = (functions == g_model.customFn) ? EE_MODEL : EE_GENERAL;
if (menuHorizontalPosition<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) {
killEvents(event);
CustomFunctionData *cfn = &functions[sub];
if (!CFN_EMPTY(cfn))
POPUP_MENU_ADD_ITEM(STR_COPY);
@@ -396,7 +395,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)