I did changed the codes.
It seems that when I press a key the "key" file is created in /tmp but it's always empty so probably that's why the script doesn't work (I'm guessing, I've no idea...)
By the way. In order to run the script I've to delete every lines in pageturn but
#!/bin/sh
echo $$ > /tmp/pageturn.pid
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}
while true; do
{
waitforkey > /tmp/key
case "$(cat /tmp/key)" in
"14 1")
next_page;;
"28 1")
prev_page;;
esac
}
done
If not, the key file is not created (nor pageturn.pid) When it runs, there are two pageturn.pid and a key file (empty) in tmp...
Thank you two
Edit: I run waitforkey in myts and ended rebooting the kindle (didn't know how to exit...)
Last edited by anonimo200; 10-06-2012 at 04:55 AM.
|