![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Pocketbook Touch HD 3
|
![]()
Hello,
on my Pocketbook Touch HD 3 I want my Back button to behave like my Forward button, so I usually edit my input.lua file and replace Code:
[framebuffer.DEVICE_ROTATED_UPRIGHT] = {}, Code:
[framebuffer.DEVICE_ROTATED_UPRIGHT] = { LPgBack = "LPgFwd", RPgBack = "RPgFwd" }, Is there a way to make this change permanent? Can I maybe use a DEFAULTS file for that which I'm not aware of? Thanks for your help! |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,095
Karma: 25013698
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2 & PW5; Kobo H2O, Forma, Elipsa & Sage
|
There's a builtin setting to invert page buttons (can't quite remember where in the top menus, though, and the device I have on hand right now doesn't have buttons; use the menu search from the hamburger menu. It *might* only be visible in a document)
![]() Barring that, it *should* be doable in a user-patch (it will need to run *after* Device's init, though). |
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Pocketbook Touch HD 3
|
I'm familiar with the built in "buttons swap function", but this is not what I want, unfortunately (this will simply swap the left and right buttons' functionality, but I want both to do "forward").
Thanks for pointing me towards the patches, I was not aware of those! I tried my best and came up with: Code:
local fn = '/mnt/ext1/applications/koreader/frontend/device/input.lua' local fp = io.open( fn, "r" ) local str = fp:read( "*all" ) str = string.gsub( str, "[framebuffer.DEVICE_ROTATED_UPRIGHT] = {}", "[framebuffer.DEVICE_ROTATED_UPRIGHT] = { LPgBack = \"LPgFwd\", RPgBack = \"RPgFwd\" }" ) fp:close() fp = io.open( fn, "w+" ) fp:write( str ) fp:close() Code:
03/23/23-18:27:35 INFO Applying patch: ./patches/1-Buttons.lua |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: Pocketbook Touch HD 3
|
OK, now it's working!!
![]() I had to write my patch like this: Code:
local fn = '/mnt/ext1/applications/koreader/frontend/device/input.lua' local fp = io.open( fn, "r" ) local str = fp:read( "*all" ) str = string.gsub( str, "%[framebuffer.DEVICE_ROTATED_UPRIGHT%] = %{%}", "%[framebuffer.DEVICE_ROTATED_UPRIGHT%] = %{ LPgBack = \"LPgFwd\", RPgBack = \"RPgFwd\" %}" ) fp:close() fp = io.open( fn, "w+" ) fp:write( str ) fp:close() |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 971
Karma: 3456791
Join Date: Sep 2014
Location: Ukraine
Device: Kindle PW2, PW3, PW4, Voyage
|
It's not the way KOReader user patches are intended to work.
https://github.com/koreader/koreader/wiki/User-patches |
![]() |
![]() |
![]() |
#6 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,095
Karma: 25013698
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2 & PW5; Kobo H2O, Forma, Elipsa & Sage
|
c.f., https://github.com/koreader/koreader...ent-1325997517 for a very strong hint about the right way to do this
![]() |
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,095
Karma: 25013698
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2 & PW5; Kobo H2O, Forma, Elipsa & Sage
|
Wrong button, yay double post ;p.
---- Said patch will require a priority prefix >= 2 |
![]() |
![]() |
![]() |
Tags |
config, input.lua, key, mapping, permanent |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Conversion Input] Microsoft Doc Input Plugin | igi | Plugins | 76 | 06-28-2019 04:47 AM |
REQ: input on Database Structure and testing a workaround input | jecilop | Library Management | 15 | 12-17-2015 12:10 AM |
DR800 Lua 5.1 MegaPackage for DR800 | Iñigo | iRex | 25 | 10-05-2011 04:11 PM |
iLiad Lua: scripting for Iliad | hansel | iRex Developer's Corner | 3 | 12-14-2008 06:51 PM |