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

page buttons in landscape mode for reMarkable 1 are reversed #6842

Open
snahvalo opened this issue Nov 1, 2020 · 12 comments
Open

page buttons in landscape mode for reMarkable 1 are reversed #6842

snahvalo opened this issue Nov 1, 2020 · 12 comments
Labels

Comments

@snahvalo
Copy link

snahvalo commented Nov 1, 2020

  • KOReader version: 2020.10.1
  • Device: reMarkable1

Issue

When viewing a pdf and rotating -90 or +90 degrees logically, and rotating the device physically to match, to view in landscape mode, the paging buttons behave in an illogical manner. The lower button when pressed brings you backward in document (from page 3 to page 2), while the upper button brings you forward in the document (from page 3 to page 4).

This does not seem logical, and is not how readers like Kobo Forma or Kobo Libra work in landscape mode.

Steps to reproduce

  1. Open pdf document
  2. Use footer menu to set rotation to +90 or -90 degrees
  3. Rotate the physical device to match the logical rotation set in step 2
  4. Press the upper button repatedly to see how you move through the document
  5. Press the lower button repeatedly to see how you move through the document
@NiLuJe
Copy link
Member

NiLuJe commented Nov 1, 2020

Given where the buttons are located (both on the bottom, one on the left, the other on the right), the naive mapping of honoring that placement makes sense.

c.f., https://github.com/koreader/koreader/blob/master/frontend/device/remarkable/event_map.lua

Do see if switching to a full LPg* or RPg* mapping helps, despite making no sense on paper ^^.

EDIT: Won't change a thing, c.f., #6842 (comment).

The rM probably warrants a custom rotation_map where LPgBack = LPgBack && RPgFwd = LPgFwd @ +90° and.... whatever you think makes sense at -90° (possibly keeping forward on the bottom, so LPgBack = RPgFwd && RPgFwd = RPgBack).

@pazos
Copy link
Member

pazos commented Nov 1, 2020

@NiLuJe: it happens also on android with (bluetooth) keyboard arrows UP/DOWN/LEFT/RIGHT and the emulator between UP/DOWN.

@NiLuJe
Copy link
Member

NiLuJe commented Nov 1, 2020

@pazos: That's

-- NOTE: When looking at the device in Portrait mode, that's assuming PgBack is on TOP, and PgFwd on the BOTTOM
rotation_map = {
[framebuffer.ORIENTATION_PORTRAIT] = {},
[framebuffer.ORIENTATION_LANDSCAPE] = { Up = "Right", Right = "Down", Down = "Left", Left = "Up", LPgBack = "LPgFwd", LPgFwd = "LPgBack", RPgBack = "RPgFwd", RPgFwd = "RPgBack" },
[framebuffer.ORIENTATION_PORTRAIT_ROTATED] = { Up = "Down", Right = "Left", Down = "Up", Left = "Right", LPgFwd = "LPgBack", LPgBack = "LPgFwd", RPgFwd = "RPgBack", RPgBack = "RPgFwd" },
[framebuffer.ORIENTATION_LANDSCAPE_ROTATED] = { Up = "Left", Right = "Up", Down = "Right", Left = "Down" }
},

I vaguely recall that it made sense the last time I checked, but that was a very long while ago ^^.

EDIT: Still does, on paper. LANDSCAPE is 90° CW (i.e., +90°), LANDSCAPE_ROTATED is 90° CCW (i.e., -90°).

@snahvalo
Copy link
Author

snahvalo commented Nov 2, 2020

What actually happens is that the top button does page forward, the bottom button does page back, whether I am at -90 or +90 degrees of rotation. So the actual behavior seems to be in conflict with the "--NOTE" text in the code you pasted above.

@NiLuJe
Copy link
Member

NiLuJe commented Nov 2, 2020

That comment refers to a classic Kindle like design with two buttons on the side, and not on the bottom like the rM.

Hence the LPg/RPg keycodes. That works just fine for a Forma or a Libra, for example ;).

@snahvalo
Copy link
Author

snahvalo commented Nov 2, 2020

My use case is the following: I am right-handed, and read in various European languages. I keep the device in portrait mode as long as the cropping gives a readable text size. If that doesn't work I rotate the device logically and physically. If I am mainly reading, I rotate it such that the buttons are on the right. If I am reading something that requires a lot of notetaking, or working through proofs or calculations on the side, I rotate it such that the buttons are on the left. The most common operation is to page forward. If the lower button in the current orientation is bound to page forward, I can press it with my arm resting on the desk, even when the device is held at an angle or placed on a reading stand. If the upper button in the current orientation is bound to page forward I must raise my entire arm to perform the operation. Ergonomically the lower button placement is better.

@NiLuJe
Copy link
Member

NiLuJe commented Nov 2, 2020

Agreed, c.f. the earlier edit of my original answer ;).

The rM probably warrants a custom rotation_map where LPgBack = LPgBack && RPgFwd = LPgFwd @ +90° and.... whatever you think makes sense at -90° (possibly keeping forward on the bottom, so LPgBack = RPgFwd && RPgFwd = RPgBack).

@zelomel
Copy link

zelomel commented Jan 13, 2021

You can invert the buttons: 3rd Menu, Navigation, Invert page turn buttons

@NiLuJe
Copy link
Member

NiLuJe commented Jan 13, 2021

Or, still waiting for someone with an rM to test & PR that custom rotation_map ^^.

@NiLuJe NiLuJe added help-wanted We'd like help with this issue low-hanging-fruit labels Jan 13, 2021
@snahvalo
Copy link
Author

Should this be working in the 2020.12 release? I have that and can test.

@snahvalo
Copy link
Author

Should this be working in the 2020.12 release? I have that and can test.

No, it does not work in 2020.12; the manual invert buttons menu choice works, but NiLuJes solution should do the right thing based on whether clockwise or counter-clockwise 90 degree rotation is chosen.

@addcninblue
Copy link

Hi everyone -- I had this exact problem, and this fixed it:

In koreader/frontend/device/input.lua, I switched ORIENTATION_LANDSCAPE_ROTATED and ORIENTATION_LANDSCAPE in the rotation_map, as follows:

rotation_map = {
    [framebuffer.ORIENTATION_PORTRAIT] = {},
    [framebuffer.ORIENTATION_LANDSCAPE_ROTATED] = { Up = "Right", Right = "Down", Down = "Left", Left = "Up", LPgBack = "LPgFwd", LPgFwd = "LPgBack", RPgBack = "RPgFw
    [framebuffer.ORIENTATION_PORTRAIT_ROTATED] = { Up = "Down", Right = "Left", Down = "Up", Left = "Right", LPgFwd = "LPgBack", LPgBack = "LPgFwd", RPgFwd = "RPgBack
    [framebuffer.ORIENTATION_LANDSCAPE] = { Up = "Left", Right = "Up", Down = "Right", Left = "Down" }
},

As this is a pretty hacky solution, I don't think this will work for all devices, but it's a decent workaround for our Remarkables.

Hope this helps!

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

No branches or pull requests

5 participants