Skip to content

Conversation

@narodnik
Copy link

@narodnik narodnik commented Dec 2, 2023

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 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.

@narodnik
Copy link
Author

narodnik commented Dec 6, 2024

Just updated this branch for the latest master. Now all new Kobo eReaders are waterproof. Please consider adding this functionality to Plato natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants