feat(color): allow long press of PAGE keys to navigate menus (#6109)

This commit is contained in:
philmoz
2025-04-28 21:28:49 +10:00
committed by GitHub
parent a22c2ec954
commit 522474cf62
3 changed files with 12 additions and 0 deletions
@@ -363,6 +363,8 @@ void TabsGroup::checkEvents()
#if defined(HARDWARE_KEYS)
void TabsGroup::onPressPGUP() { header->prevTab(); }
void TabsGroup::onPressPGDN() { header->nextTab(); }
void TabsGroup::onLongPressPGUP() { header->prevTab(); }
void TabsGroup::onLongPressPGDN() { header->nextTab(); }
void TabsGroup::onLongPressRTN() { onCancel(); }
#endif
+2
View File
@@ -100,6 +100,8 @@ class TabsGroup : public NavWindow
#if defined(HARDWARE_KEYS)
void onPressPGUP() override;
void onPressPGDN() override;
void onLongPressPGUP() override;
void onLongPressPGDN() override;
void onLongPressRTN() override;
#endif
};
+8
View File
@@ -446,6 +446,14 @@ void NavWindow::onEvent(event_t event)
onPressPGUP();
break;
case EVT_KEY_LONG(KEY_PAGEDN):
onLongPressPGDN();
break;
case EVT_KEY_LONG(KEY_PAGEUP):
onLongPressPGUP();
break;
case EVT_KEY_LONG(KEY_EXIT):
onLongPressRTN();
break;