koreader/koreader

AppImage key handling bug

Opened this issue · 4 comments

  • KOReader version: any version built using Ubuntu Focal SDL2
  • Device: AppImage

Issue

  • start KORreader on virtual desktop 1, give it focus
  • open a EPUB/PDF at the end
  • switch to desktop 2
  • switch back to desktop 1 with the keyboard (Super+1): KOReader is given focus, and act as if a 1 was pressed, jumping to the start of the book

Traces when jumping back to desktop 1:

09/01/24-03:01:57 DEBUG key event => code: 49 (1), value: 1, time: 17715.208155
09/01/24-03:01:57 DEBUG goto document offset in percent: 0
Focus out:

This is fixed when compiling our own SDL2 version.

Compiling it sounds fine to me, but it was a nice way to avoid having to worry about libx11, libwayland, libxt, libxv, libudev, libgl, and whatever else I may be overlooking otoh.

I'm mildly confused by the issue description though. We don't grab input, whether mouse or keyboard.

What make you think input grabbing is involved?

System shortcuts shouldn't end up in the program in the first place, unless SDL grabs the keyboard. It doesn't obviously sound like an SDL issue.

That is, precisely because input grabbing is not involved is why it's confusing.