mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-05-18 05:15:06 +00:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user