Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2011, 03:51 PM   #1
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
pageturn - map your own 'next_page'/'previous_page' buttons

This hack contains script, which allows you to map your own "next page" and "previous page" buttons easily. By default it uses "Center" and "Enter" keys.

There are two versions, one contains additional orientation check, so it works in landscape orientation only, second works for all orientations.

Please notice, that this script doesnt change original behaviour of keys in any way.

How to install :
- Copy pageturn folder to root.
- Copy pageturn.ini to launchpad directory.

How to run :
- Activate it with "SHIFT+P+P" command.

How to exit :
- Terminate it with "SHIFT+O+O" command.
Attached Files
File Type: zip Pageturn.zip (2.7 KB, 192 views)
File Type: zip Pageturn-all.zip (2.6 KB, 415 views)

Last edited by seaniko7; 07-12-2011 at 03:16 PM.
seaniko7 is offline   Reply With Quote
Old 07-09-2011, 05:00 PM   #2
cfrock
Enthusiast
cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.cfrock once ate a cherry pie in a record 7 seconds.
 
cfrock's Avatar
 
Posts: 47
Karma: 1840
Join Date: Jun 2010
Device: Nook STR & K3
Very nice, great idea as well!
Thank you.
cfrock is offline   Reply With Quote
Old 07-10-2011, 08:02 AM   #3
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 289158
Join Date: May 2011
Device: Kobo Glo and Aura HD
this will be really useful. Thanks!
giorgio130 is offline   Reply With Quote
Old 07-10-2011, 01:20 PM   #4
vcuong
Junior Member
vcuong began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2011
Device: kindle 3
thanks a lot brother, it's very useful!
vcuong is offline   Reply With Quote
Old 07-10-2011, 01:34 PM   #5
Kenneth_irl
Addict
Kenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplane
 
Kenneth_irl's Avatar
 
Posts: 200
Karma: 55934
Join Date: Jan 2011
Location: Denmark
Device: Kindle 3
Quote:
Originally Posted by seaniko7 View Post
I wrote small script, which activates fiveway center button as third next page button while in landscape orientation.

Copy pageturnforward to root, pageturnforward.ini to launchpad directory, activate it with "SHIFT+P+P" command and you're good to go.

Feel free to play with mapping your own buttons.

pageturnforward.zip
Dude, you rock! Very useful for me. It might be a simple script, sure, but I couldn't do it, I think. Thanks, man.
Kenneth_irl is offline   Reply With Quote
Old 07-10-2011, 06:54 PM   #6
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
Smile

Hey seaniko I just gave you good karma! WELL DONE on the hack!
works perfectly

If I may, can I please ask you if it is possible to make the page turn during 'Portrait' mode too. (i.e. being in Portrait or Landscape orientation, when you press the Center Button, it goes forward 1 page). I believe you would need to copy the paragraph of code and make it inclusive after the code for orientation to include the Orientation.


Also is it possible to re-map the 'Spacebar' key to make a next page turn?

Thanks for your great help and dedication.


Quote:
Originally Posted by seaniko7 View Post
I wrote small script, which activates fiveway center button as third next page button while in landscape orientation.

Copy pageturnforward to root, pageturnforward.ini to launchpad directory, activate it with "SHIFT+P+P" command and you're good to go.

Feel free to play with mapping your own buttons.

pageturnforward.zip
jeromedevine is offline   Reply With Quote
Old 07-11-2011, 09:02 AM   #7
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
Thanks, I'm glad it's useful for you.

As some of you already noticed, script sometimes causes turning more than one page. I've added delay command so it acts more like original next page button. You can find fixed script as well as version without orientation check in first post.

@jeromedevine, yes it is possible to map spacebar key, but it will also bring search box everytime you press it, because my script isn't blocking original funcionality of keys.
seaniko7 is offline   Reply With Quote
Old 07-11-2011, 04:02 PM   #8
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
Smile

Oh...that makes sense!

I checked my Kindle 3 keyboard and saw that there is the 'Alt' button that when pressed does not make a key shown. (I sometimes use Alt + B to make bookmarks but I don't use that so much)

Do you think you can make an alternative one with the 'Alt' button to go Page forward? The reason why it would be great is because that way you can hold your kindle with your hands Landscape and press on a key at the bottom rather than at the top. It would be awesome if you can manage to code this!!!



Quote:
Originally Posted by seaniko7 View Post
Thanks, I'm glad it's useful for you.

As some of you already noticed, script sometimes causes turning more than one page. I've added delay command so it acts more like original next page button. You can find fixed script as well as version without orientation check in first post.

@jeromedevine, yes it is possible to map spacebar key, but it will also bring search box everytime you press it, because my script isn't blocking original funcionality of keys.
jeromedevine is offline   Reply With Quote
Old 07-11-2011, 09:56 PM   #9
Kenneth_irl
Addict
Kenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplane
 
Kenneth_irl's Avatar
 
Posts: 200
Karma: 55934
Join Date: Jan 2011
Location: Denmark
Device: Kindle 3
Any way to disable this script without during a reset?
Kenneth_irl is offline   Reply With Quote
Old 07-12-2011, 01:11 AM   #10
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
I found out that the 'Alt' button code is 56.

I amended the code and replaced 194 with 56 like as it is underneath but it didn't work:

#!/bin/sh

#let's use some helpers
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}
#big loop
while true; do
{
#wait for center key
if waitforkey 56 ; then
next_page
#wait a while to prevent from turning too many pages at once
sleep 1
fi
}
done





Then in the .ini file I amended so:


[Actions]
;; pageturnforward1
P A = !sh /mnt/us/pageturnforward1 &


After I renamed the 'pageturnforward' file to 'pageturnforward1' (also I amended the .ini file by including '1' after filename) so that I would still have the pageturnforward script available as well. I amended as well the keys to press and changed it from P P to P A

Can anyone hint me what I am doing wrong for it not to work?
jeromedevine is offline   Reply With Quote
Old 07-12-2011, 03:49 AM   #11
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
@Kenneth_irl I'll add command to stop script later.
@jeromedevine, alt key is acting in diffrent way than others as it's a modifer key. Kindle detects alt key press when you press another key after it.

It goes like this :
Press alt - press another key - Kindle detects alt press.
seaniko7 is offline   Reply With Quote
Old 07-12-2011, 01:02 PM   #12
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
I've updated scripts with keydefs from launchpad, so it's easier to map your own keys.

New version also includes exit script.

Enjoy.
seaniko7 is offline   Reply With Quote
Old 07-12-2011, 01:16 PM   #13
Kenneth_irl
Addict
Kenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplane
 
Kenneth_irl's Avatar
 
Posts: 200
Karma: 55934
Join Date: Jan 2011
Location: Denmark
Device: Kindle 3
Quote:
Originally Posted by seaniko7 View Post
I've updated scripts with keydefs from launchpad, so it's easier to map your own keys.

New version also includes exit script.

Enjoy.
Awesome.
Kenneth_irl is offline   Reply With Quote
Old 07-12-2011, 01:43 PM   #14
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
I suggest the insertion in the code to allow as well the press of 'Enter' button to go to Previous Page.

The key code for 'Enter' is 28.


Also, can there be the insertion of a condition argument check, to check if the screen shows a menu (i.e. not in page reading mode) and if it is in menu mode, the Next Page command is not executed. This would solve some minor problem when you try to insert a command from the menu.
jeromedevine is offline   Reply With Quote
Old 07-12-2011, 03:23 PM   #15
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
@jeromedevine, unfortunately not, it's closed part of kindle software.

Please check first post, now script supports turning pages forward and backward, as jeromedevine suggested and there is no need to add delay, as mapped keys act equally to original by adding write/read commands.
seaniko7 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
5-way button for page turning bosie Amazon Kindle 5 04-28-2011 09:53 AM
Right button (next page) not always responding andrewcrlucas Kobo Reader 28 07-16-2010 11:03 AM
Request Continuous (PAN and Next Page) Mode with the Next Page button AnuragSethi enTourage Archive 4 06-18-2010 04:25 PM
Next page button pushed in too far? jurat Amazon Kindle 5 06-02-2010 03:59 AM
Wierd page up/down button dcubed2 enTourage Archive 9 05-04-2010 12:19 PM


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


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