Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReMarkable: When half asleep, short press on middle button launches KOReader (should require 3 second press) #6029

Closed
Thra11 opened this issue Apr 7, 2020 · 5 comments · Fixed by #6396

Comments

@Thra11
Copy link
Contributor

Thra11 commented Apr 7, 2020

  • KOReader version: 2020.02
  • Device: ReMarkable

Issue

Short press on middle button when sleeping launches KOReader.

Steps to reproduce

  1. Install KOReader on the ReMarkable, but close it/run the original device firmware.
  2. Do nothing for a while: the device enters its first sleep stage, with a message on the screen telling you to press the middle button to continue.
  3. Press the middle button (single press, not hold). This should wake the device and allow you to keep using the device firmware.

What actually happens is that KOReader is launched, despite the press being less than 3 seconds.

It's possible to avoid the issue by using the button on the top of the device to wake it instead of the middle button.

@Thra11 Thra11 changed the title ReMarkable: When half asleep, ReMarkable: When half asleep, short press on middle button launches KOReader (should require 3 second press) Apr 7, 2020
@pazos
Copy link
Member

pazos commented Apr 7, 2020

@Thra11: the helper used to launch KOReader is hosted in https://github.com/koreader/koreader-base/blob/master/button-listen.c.

Probably ev.time isn't updated during suspend and any key event will pass the threeshold.

@Thra11
Copy link
Contributor Author

Thra11 commented Apr 7, 2020

If it misses the press completely (because it's asleep) then press_stamp will be left at whatever value it was last time it was pressed before sleeping. Perhaps we could reset press_stamp to a known/invalid value in the code which handles the release, so we can tell whether we had a press+release pair rather than just the release.

@pazos
Copy link
Member

pazos commented Apr 11, 2020

@Thra11: feel free to play with the code. I don't have a device to tinker with.

@NiLuJe
Copy link
Member

NiLuJe commented Apr 11, 2020

And since I don't recall if the system ships with a strace binary, here's one ;).

@tcrs
Copy link
Contributor

tcrs commented Jul 19, 2020

Turns out I had my GutHub email notifications disabled so didn't see this until now. Looked into it, should be fixed by koreader/koreader-base#1145

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

Successfully merging a pull request may close this issue.

5 participants