03-01-2016, 12:38 AM | #1 |
Born empty--part full...
Posts: 8
Karma: 10
Join Date: Feb 2016
Location: Henderson, NV, USA
Device: Kindle Paperwhite
|
Script simulating PW3 keypress, PDF slideshow
This link is a thread on simulating keypresses:
https://www.mobileread.com/forums/sho...d.php?t=118480 and calls out an old line of code that reportedly simulates a keypress: Code:
echo "send 104" > /proc/keypad The same thread lists a web page URL for device names and keycodes from two .ini files from their related projects: http://info.iet.unipi.it/~luigi/kindle First, I have to figure out what to send. I have run some tests on the PW3 to check for scancode values being generated through /dev/input/event0 on a multi-page PDF using evtest, but its output wasn't providing any clues to 1) what codes needed to be sent to forward paging through a displayed PDF file, 2) what codes were needed for backward paging, nor 3) to what device or character stream they needed to be directed. Ultimately, I'd like to get enough of the puzzle pieces to create a UNIX script, programmed to run self-contained on the Kindle, making a displayed PDF document go forward x pages, then backward x pages, then repeating until I hit the home button. I will have an SSH connection to set things up, get it running, then disconnect and let it run. Can anyone help provide the pieces I need? Thanks. |
03-01-2016, 12:56 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Previous discussion: https://www.mobileread.com/forums/sho...d.php?t=267995
Last edited by eschwartz; 03-01-2016 at 12:59 AM. |
Advert | |
|
03-03-2016, 04:19 PM | #3 | |||
Born empty--part full...
Posts: 8
Karma: 10
Join Date: Feb 2016
Location: Henderson, NV, USA
Device: Kindle Paperwhite
|
[Solved] Working PDF slideshow
Quote:
I used a hex editor to skinny down the Right and Left command text files making them as short as possible. One thing I did differently that's worth passing on comes from this posting on the thread noted above: Quote:
more touch.txt > /dev/input/event1 My loop repeats forward to the end, then backwards back to the beginning, then repeats. Tips for those who follow:
I'd like to have a more elegant way to activate and deactivate the script from the Helper menu, or in a menu of my own. My script loops permanently until I power it down to shut it off--programmer I'm not... yet. I'm on the Wiki https://wiki.mobileread.com/wiki/KUAL_What%27s_New looking for how to customize KUAL for my purposes. Another helpful change will be figuring out how to merge the thread that discusses disabling the screen's touch interface--the untouchable kindle: Quote:
|
|||
03-03-2016, 04:39 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
You will want to kill the process then, using `pkill -f scriptname.sh`
It shouldn't be hard to make a few KUAL buttons to start and stop the script. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulating input on KV via SSH | tommyderami | Kindle Developer's Corner | 5 | 02-07-2017 07:46 AM |
Troubleshooting Kindle 3 (keyboard) erratic keypress behavior | wirawan0 | Amazon Kindle | 2 | 04-24-2014 07:23 AM |
ePUB + PDF creation script | Trouhel | ePub | 30 | 07-28-2012 09:02 AM |
Delete books with a single keypress? | MikeOxlittle | Calibre | 6 | 07-08-2011 10:41 AM |
JetBook PDF antialiasing script | syrex314 | Ectaco jetBook | 7 | 05-18-2010 07:23 PM |