View Single Post
Old 03-23-2023, 02:29 PM   #4
cherusker
Junior Member
cherusker began at the beginning.
 
cherusker's Avatar
 
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()
So the brackets need the percentage sign in front of them. Cool!
cherusker is offline   Reply With Quote