Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2020, 04:44 PM   #1
Xaenor
Enthusiast
Xaenor began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2020
Device: Pocketbook Era
KOReader: reassign buttons on Libra H2O

Hello!

I'm sorry if this came up before - I used the search function, but to no avail. I've been using KOReader on Libra H2O, and it's been great! But I'd like to ask something - is there a way to reassign the physical buttons on Libra to always flip to the next page no matter what? I know you can invert their functions, so that the top button turns the page forward, while the bottom one returns to the previous page, but I want both of them to go forward at the same time, no matter the rotation of the device. Would that be possible?

And while we're at it, I guess I might as well ask something else - is there a way to configure each margin individually? Namely, I set all the margins to the minimum in the bottom menu, but the right margin still has some empty space left in it for some reason. Here's a link to a photo:

https://imgur.com/ukNEurb

This hasn't actually been happening to every book I read - some look totally fine, and the text occupies the entire page with no margins left. Could this possibly be a book's fault?

For instance, compare with this image, where there's no empty space to the right. To my knowledge, I haven't changed any margin-related options between taking these two photos:

https://imgur.com/a/BMJE6Bq

Last edited by Xaenor; 04-05-2020 at 04:46 PM.
Xaenor is offline   Reply With Quote
Old 04-05-2020, 04:58 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yep, the margin issue is most likely wonky CSS somewhere in the book.

FWIW, my American Gods copy is just fine, but then it was originally a Kindle purchase for the anniversary re-release, so it's been through Calibre a couple times .

EDIT: Actually, nope, on my Kobos it's this one. (I, err, may have *quite* a few copies of American Gods lying around, including a couple good old mmpb ).

----

As for the buttons, something like this should do the trick: https://github.com/koreader/koreader/wiki/Keymapping

Last edited by NiLuJe; 04-05-2020 at 05:01 PM.
NiLuJe is offline   Reply With Quote
Old 04-05-2020, 05:22 PM   #3
Xaenor
Enthusiast
Xaenor began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2020
Device: Pocketbook Era
NiLuJe, you're nothing short of a hero! It seems that Libra uses the same codes for buttons as Forma (which makes sense), so it only took the following command to map both buttons to always turn forward:

Code:
return {
            [193] = "RPgFwd",
            [194] = "RPgFwd",
 }
(And inverting them in the menu of KOReader produces the reverse effect.)

And thanks for sharing your experience with American Gods - glad to know it's not KOReader-related. It's my first acquaintance with Neil Gaiman (other than Good Omens), and I'm having a blast with it!

Thank you for your time and enjoy your day!
Xaenor is offline   Reply With Quote
Old 11-25-2021, 08:59 AM   #4
prekabik
Junior Member
prekabik began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H2O
Hi guys, is it a way to have assigned both physical keys to forward page, but to have it funcionaly in both screen orientations? Now when I assign both keys to forward page it works properly in right mode hand, but when I have left hand side mode then keys are switching the page back :/
prekabik is offline   Reply With Quote
Old 11-25-2021, 12:42 PM   #5
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by prekabik View Post
Hi guys, is it a way to have assigned both physical keys to forward page, but to have it funcionaly in both screen orientations? Now when I assign both keys to forward page it works properly in right mode hand, but when I have left hand side mode then keys are switching the page back :/
No without a patch. Some actions , like page forward and page back, are mapped according to current device rotation. See https://github.com/koreader/koreader....lua#L170-L175

Maybe we can add a setting to ignore remapping keys based on rotation?. I'm not sure what NiLuJe thinks.
pazos is offline   Reply With Quote
Old 11-25-2021, 02:01 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
IIRC, this is also vaguely broken on the reMarkable because no-one actually cared enough to fix it, FWIW ;p.
NiLuJe is offline   Reply With Quote
Old 11-29-2021, 07:14 AM   #7
prekabik
Junior Member
prekabik began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra H2O
So guys, is something what I could do myself or should I wait for any solution from you wise men?
prekabik is offline   Reply With Quote
Old 11-29-2021, 02:03 PM   #8
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by prekabik View Post
So guys, is something what I could do myself or should I wait for any solution from you wise men?
Change https://github.com/koreader/koreader....lua#L170-L175

On your device it will be placed on /mnt/onboard/.adds/koreader/frontend/device/input.lua

You just need to change a single action. Asumming you asigned both keys to "LPgFwd"

Instead of
Code:
LPgFwd = "LPgBack"
You need
Code:
LPgFwd = "LPgFwd"
Remember to apply the same change after each update.
pazos is offline   Reply With Quote
Old 01-12-2022, 10:48 AM   #9
peznarf_holmluck
Junior Member
peznarf_holmluck began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2022
Device: Tolino Vision 5
Hey pazos,

I'm attempting to do just what you suggest:

Quote:
Change https://github.com/koreader/koreader....lua#L170-L175

On your device it will be placed on /mnt/onboard/.adds/koreader/frontend/device/input.lua

You just need to change a single action. Asumming you asigned both keys to "LPgFwd"
But I don't know how to find input.lua on my device (Tolino Vision 5). Using adb shell, there seems to be 'No such file or directory'.

I'm sure this is me being dense--could you please point me in the right direction in order to access files such as input.lua on my device?
peznarf_holmluck is offline   Reply With Quote
Old 01-12-2022, 01:32 PM   #10
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by peznarf_holmluck View Post
Hey pazos,

I'm attempting to do just what you suggest:



But I don't know how to find input.lua on my device (Tolino Vision 5). Using adb shell, there seems to be 'No such file or directory'.

I'm sure this is me being dense--could you please point me in the right direction in order to access files such as input.lua on my device?
Instructions on this thread are specific for kobo users.

You can do the same on android if your device is rooted. Just replace /mnt/onboard/.adds/koreader with /data/data/org.koreader.launcher/files, the rest of the path is the same.
pazos is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Libra H2O case rreed Kobo Reader 21 12-28-2019 08:50 AM
Libra Can someone help me installing KSM and KOReader on Libra please? Bolognie1 Kobo Reader 1 11-17-2019 11:22 AM
New to Kobo world with Libra H2O mspalacios Kobo Reader 8 10-13-2019 11:35 PM
Koreader on Kobo Libra H2O. Hard button inverted in portrait gilali KOReader 5 10-08-2019 05:09 PM
Libra Problem installing Koreader on Kobo Libra H2O Michal Jancik Kobo Reader 15 09-21-2019 04:28 PM


All times are GMT -4. The time now is 12:51 AM.


MobileRead.com is a privately owned, operated and funded community.