From e25864467151f6422667ece7ca3f9987354fe58d Mon Sep 17 00:00:00 2001 From: drkhsh Date: Sun, 26 Apr 2026 21:53:14 +0200 Subject: [PATCH] InputManager: suppress wake-click as enter event Trackball click already wakes the screen and is the documented way to revive the device. Firing it as an enter event after release means the wake also confirms whatever was focused at the time. Gate short-click emit on _clickFromScreenOn (already captured at click-down for the long-press case) so the press only does its wake job when the screen was off. --- src/input/InputManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input/InputManager.cpp b/src/input/InputManager.cpp index c0b7bca..94b0b41 100644 --- a/src/input/InputManager.cpp +++ b/src/input/InputManager.cpp @@ -107,8 +107,9 @@ void InputManager::update() { // GPIO is HIGH — only accept release after debounce period if (millis() - _lastClickDownMs >= CLICK_DEBOUNCE_MS) { _clickPending = false; - if (!_longPressFired && !_hasKey) { - // Short click — generate deferred enter event + // Suppress wake-click: if the press began with the screen off, + // the click's job was just to wake the device, not to confirm. + if (!_longPressFired && !_hasKey && _clickFromScreenOn) { _keyEvent = {}; _keyEvent.enter = true; _keyEvent.character = '\n';