chore(bw): simplify navigation code (#5269)

This commit is contained in:
philmoz
2024-07-28 08:13:20 +10:00
committed by GitHub
parent c086eb4bd9
commit 0cc22c364d
40 changed files with 422 additions and 1590 deletions
+2 -1
View File
@@ -102,7 +102,7 @@ event_t Key::input(bool val)
evt = (m_flags & KFLAG_LONG_PRESS) ? _MSK_KEY_LONG_BRK : _MSK_KEY_BREAK;
}
#else
if ((m_flags & (KFLAG_KILLED|KFLAG_LONG_PRESS)) == 0) {
if ((m_flags & (KFLAG_KILLED)) == 0) {
evt = _MSK_KEY_BREAK;
}
#endif
@@ -443,6 +443,7 @@ bool keysPollingCycle()
if (evt == EVT_KEY_LONG(KEY_PAGEDN)) {
// Convert long press PAGEDN to short press PAGEUP
evt = EVT_KEY_BREAK(KEY_PAGEUP);
killEvents(KEY_PAGEDN);
}
#endif
#if defined(KEYS_GPIO_REG_SHIFT)