I have a waterproof Kobo Libra H2O. In the rain or shower, water generates touch events on the screen. I want a way to disable these temporarily and only use the buttons.
The functionality is accessible inside the reader, select the top bar and select "Lock Screen Input". Then the screen is disabled, but you can still navigate using the buttons. Pressing them together unlocks the screen.
Core Organization
Most of the code is implemented in the top level plato and emulator apps. The code is duplicated, so I'd appreciate advise on where to put them. I added a LockScreenInput event, which sets a boolean, and then sends Event::Toggle(ViewId::TopBottomBars).
When the boolean is_screen_locked is set, then all Gesture events are caught and skipped. Lmk if this is the correct way to do this.
Apart from that, there's a bit of logic to handle pressing both buttons together.
Motivation
I have a waterproof Kobo Libra H2O. In the rain or shower, water generates touch events on the screen. I want a way to disable these temporarily and only use the buttons.
The functionality is accessible inside the reader, select the top bar and select "Lock Screen Input". Then the screen is disabled, but you can still navigate using the buttons. Pressing them together unlocks the screen.
Core Organization
Most of the code is implemented in the top level plato and emulator apps. The code is duplicated, so I'd appreciate advise on where to put them. I added a
LockScreenInput
event, which sets a boolean, and then sendsEvent::Toggle(ViewId::TopBottomBars)
.When the boolean
is_screen_locked
is set, then all Gesture events are caught and skipped. Lmk if this is the correct way to do this.Apart from that, there's a bit of logic to handle pressing both buttons together.