-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hardware buttons don't work #5761
Comments
to log input events
on linux/mac:
Logs are something like
|
Here is the log file, entries for the landscape format begin in line 1301. |
@elvvis: could you please use the specific command, and just press one time each button in the same order for both portrait and landscape? Thanks! I'm willing to help but the logs you're providing are not the logs that were requested. |
Sorry, i can‘t use the specific command, because there is no ‚grep‘ on windows. |
|
portrait: landscape: |
@elvvis: much better, thanks! As you see they're both the same events in potrait and landscape. So I dunno why it works on portrait and not in landscape. Anyways, you can override the event map using this as a template and replacing values with the codes you provide. That is: instead of left/right use LPgBack/LPgFwd. You can map these events as you like so both return {
[21] = "LPgBack",
[22] = "LPgFwd",
} and return {
[21] = "LPgFwd",
[22] = "LPgBack",
} should work. |
With customizing the key mappings and use of LPgBack/LPgFwd instead of left/right it works. |
Cool. I labeled as won't fix as it cannot be fixed programatically. Android ereaders are just like cars but in cars the layout of the pedals is enforced by regulations and laws and nothing is enforcing these devices to follow google keycodes. It can be workarounded but requires code per device or type of device (like the epd driver). If someone wants to do it feel free to modify https://github.com/koreader/android-luajit-launcher/blob/master/app/src/org/koreader/launcher/DeviceInfo.kt, add a new type of The workaround is simpler to do and easier to keep updated for borked devices (ie: keeping the wiki in sync with new reports). Just like in #5364 we might want to stick with google best practices, allow PR for specific devices and keep the issue open to allow future duplicates. I'll update the title and OP with the relevant info. |
@pazos Should this be closed? |
The issue is linked in https://github.com/koreader/koreader/wiki/Android-tips-and-tricks, so it should be ok to close it if we close future duplicates too. |
Alright, I'll close it then. |
original message
Issue
Hardware buttons for turning the pages do not work in landscape mode, but they do in portrait mode.
EDIT
answer for all devices: koreader maps android keycodes to specific actions. See defaults following aosp/sdk/ndk standard keycodes.
If your device don't follow standard google keycodes (mainly because it is a e-ink reader poorly launch'd) you'll need to override the keymap for your device
To log the keycodes used by your device read the next post
The text was updated successfully, but these errors were encountered: