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.
This commit is contained in:
drkhsh
2026-04-26 21:53:14 +02:00
parent 37b536ea7f
commit e258644671
+3 -2
View File
@@ -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';