pager: reset idle timer on keyboard and encoder activity
Neither input path called noteUserInput() for the common no-field-focused case, so the idle timeout kept counting down during active use: - handleHwKey()'s no-textarea branch only calls noteUserInput() when dismissing a popup or matching a tab hotkey. tabForKey() no longer maps any letters (tab jumps moved to the trackball-only programmable hotkeys) and isDismissKey() always returns false for the pager's full QWERTY, so with no field focused, every keypress silently no-op'd here. - updatePagerEncoder() only called noteUserInput() to wake an already-off screen; turning or clicking the encoder while the screen was ON never reset the timer. This board has no touch and no trackball to fall back on for idle-reset, so both gaps were fatal: the screen dimmed after ~30s of real use. User-verified fixed on hardware. Signed-off-by: Tesso M Costa <tesso.martins@gmail.com>
This commit is contained in:
1 parent
f9c3db99c2
commit
53251c33e0
1 file changed
+16
@@ -26930,6 +26930,11 @@ static void updatePagerEncoder(unsigned long now) {
|
||||
if (delta != 0 || held) g_lv.task->wakeScreen();
|
||||
return;
|
||||
}
|
||||
// Screen already on: turning/clicking the encoder is real activity too, same as a
|
||||
// keypress -- without this the idle timer kept counting down through continuous
|
||||
// rotary navigation (nothing else on this board resets it; see handleHwKey()'s
|
||||
// matching TLORA_PAGER fix) and the screen dimmed mid-use.
|
||||
if ((delta != 0 || held) && g_lv.task) g_lv.task->noteUserInput();
|
||||
|
||||
for (; delta > 0; delta--) navPushTap(LV_KEY_NEXT);
|
||||
for (; delta < 0; delta++) navPushTap(LV_KEY_PREV);
|
||||
@@ -28087,6 +28092,17 @@ static void handleHwKey(int key) {
|
||||
if (g_lv.task && g_lv.task->isManualLock()) { g_lv.task->lockscreenReveal(); return; }
|
||||
// Idle-dimmed (not hard-locked): ignore keys; a touch/click wakes into the UI.
|
||||
if (g_lv.task && g_lv.task->isScreenOff()) return;
|
||||
#if defined(TLORA_PAGER)
|
||||
// No touch and no trackball on this board: every OTHER input path that resets the
|
||||
// idle timer (touch taps, trackball moves) doesn't exist here, and below this point
|
||||
// a keypress only calls noteUserInput() when it lands in a focused field, dismisses
|
||||
// a popup, or matches a tab hotkey -- tabForKey() no longer maps any letters (tab
|
||||
// jumps moved to the trackball-only programmable hotkeys) and isDismissKey() always
|
||||
// returns false on this full QWERTY, so with no field focused EVERY key silently
|
||||
// no-op'd here and the idle timer kept counting down while the user was actively
|
||||
// pressing keys (reported bug: screen dims after ~30s despite keyboard input).
|
||||
if (g_lv.task) g_lv.task->noteUserInput();
|
||||
#endif
|
||||
#if CAP_TRACKBALL
|
||||
// Remapping a tab hotkey (Settings → Keyboard): capture the next key press.
|
||||
if (s_navkey_capture >= 0) { navKeyCaptureApply(key); return; }
|
||||
|
||||
Reference in new issue
Block a user