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 10-07-2016, 02:46 PM   #1
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Cool Kindle Intocable: extension to turn off touchscreen capability on Voyage

Hi all,

The whole reason I got the voyage over other Kindle e-readers is my preference for using them to turn pages over touching the screen. As I read, I tend to touch the screen all the time, accidentally, and it pretty much makes reading on the device untenable. Unfortunately, the Voyage uses both the touchscreen *and* the buttons to turn pages. It was unworkable.

I tried out the Kindle Untouchable extension (which was made in 2012 for the Kindle Touch) and it kind-of worked for the voyage, but only kind of.

Anyway, heavily borrowing from the author's original code, I reworked the extension to capitalize on the features of the Voyage. Using this hack, the buttons work as usual, but if you press and *hold* the 'previous page' button, it turns off the touchscreen ability. The buttons still work fine! And, if you see a word you need to look up, or a passage you need to highlight/annotate, you can just press and hold the button again to turn it back on.

In addition to it's exploiting the Voyage's extra buttons, it fixes a bug in the old extension: the way the old extension went forward or back a page was by sending a fake "touch" event to the device. The region this touch event "touched" usually lead to the device to advance (or go back) a page but if it happened to "click" on a link, it would follow the link. This extension, instead, sends a fake button click event that the device knows how to unambiguously interpret.

Use it with KUAL. The source code is in the extension.

PS: compiling X11 for the kindle cross compiler was a NIGHTMARE!!

[latest update: 10/24/16]
I provided a fix for the issue of intocable preventing the user from putting in the password after the screensaver comes on. It also adds a KUAL button to kill intocable, if the user wants to.
Attached Files
File Type: gz intocable-v2.0.tar.gz (6.9 KB, 191 views)

Last edited by thumbstump; 10-24-2016 at 02:24 AM. Reason: update to software
thumbstump is offline   Reply With Quote
Advert
Old 10-08-2016, 03:55 AM   #2
fferl
Junior Member
fferl began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2009
Device: Sony PRS 700
Thanks a lot. Tested, very useful
fferl is offline   Reply With Quote
Old 10-09-2016, 04:01 AM   #3
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 227
Karma: 136000
Join Date: Apr 2013
Device: PW
Yes thanks for the work, cool!

Personally I think something like this would be best if we had to touch the touchscreen twice instead of once.
So if we want to bring up the home menu or change the page, we need to quick touches instead of one.

Do you think that would be difficult to implement?
zxczxc is offline   Reply With Quote
Old 10-11-2016, 03:01 PM   #4
BiliBug
Junior Member
BiliBug began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2012
Location: Somerset, NJ
Device: Kindle 3, PW, Voyage
This extension provides exactly the functionality I was searching for. I too can not believe that Amazon did not include such a setting on the Voyage.

I have run into one issue, though.... I use a passcode to lock my Kindle. If the Kindle falls asleep or I close the cover while the extension is activated, I can not type in my password to unlock the device. Because it is not unlocked, the page turn buttons do not work, so I can't deactivate the extension.

The only workaround I've found is to restart the device using the power button, which in turn disables the extension completely requiring opening KUAL to reenable it. Is there a more elegant solution?
BiliBug is offline   Reply With Quote
Old 10-12-2016, 04:20 AM   #5
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 227
Karma: 136000
Join Date: Apr 2013
Device: PW
Quote:
Originally Posted by BiliBug View Post
This extension provides exactly the functionality I was searching for. I too can not believe that Amazon did not include such a setting on the Voyage.

I have run into one issue, though.... I use a passcode to lock my Kindle. If the Kindle falls asleep or I close the cover while the extension is activated, I can not type in my password to unlock the device. Because it is not unlocked, the page turn buttons do not work, so I can't deactivate the extension.

The only workaround I've found is to restart the device using the power button, which in turn disables the extension completely requiring opening KUAL to reenable it. Is there a more elegant solution?
The creator could check if the device is in screensaver mode, and if so, disable the touch disabling until it is awake again?
Something like that at least! I do something a little similar in KindleLazy.
Here is some code for the author:
Code:
//runs and returns output of a command
std::string exec(const char* cmd) {
    char buffer[128];
    std::string result = "";
    std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);
    if (!pipe) throw std::runtime_error("popen() failed!");
    while (!feof(pipe.get())) {
        if (fgets(buffer, 128, pipe.get()) != NULL)
            result += buffer;
    }
    return result;
}



        std::string state = exec("lipc-get-prop com.lab126.powerd state");
        state.pop_back(); //remove newline from string
        if(state.compare("screenSaver") == 0){
            //we are sleeping so STOP disabling the touch, so we can use it for the password
            //and when we are awake again, feel free to reactivatate
        }
zxczxc is offline   Reply With Quote
Advert
Old 10-12-2016, 09:15 AM   #6
dhdurgee
Addict
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 341
Karma: 763894
Join Date: Jun 2010
Device: K3W, KT2
Isn't there a wait until screen saver is activated that can be used? I would imagine that is exactly how the screen saver mod works, by intercepting that call and taking over from the default screen saver.

Dave
dhdurgee is online now   Reply With Quote
Old 10-13-2016, 05:06 PM   #7
byzkarl
Member
byzkarl began at the beginning.
 
Posts: 15
Karma: 22
Join Date: Sep 2011
Device: Sony PRS-350
This is the greatest thing I never knew I needed.

How long does one have to hold the button? Idea: have the button give a haptic buzz when the touchscreen turns off.
byzkarl is offline   Reply With Quote
Old 10-15-2016, 10:37 AM   #8
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Quote:
Originally Posted by byzkarl View Post
This is the greatest thing I never knew I needed.

How long does one have to hold the button? Idea: have the button give a haptic buzz when the touchscreen turns off.
500 (milliseconds?). But the length of time is configurable if you edit the shell script in the extension.
I'll look into providing that haptic feedback. If you know how to, programmatically, please share it
thumbstump is offline   Reply With Quote
Old 10-15-2016, 10:40 AM   #9
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Quote:
Originally Posted by BiliBug View Post
This extension provides exactly the functionality I was searching for. I too can not believe that Amazon did not include such a setting on the Voyage.

I have run into one issue, though.... I use a passcode to lock my Kindle. If the Kindle falls asleep or I close the cover while the extension is activated, I can not type in my password to unlock the device. Because it is not unlocked, the page turn buttons do not work, so I can't deactivate the extension.

The only workaround I've found is to restart the device using the power button, which in turn disables the extension completely requiring opening KUAL to reenable it. Is there a more elegant solution?
I'll look into this (and thanks @zxczxc for the code I might use).

The problem is, the program would have to check if it's in screensaver mode every touch and if there's a lot of computation in the event capture loop, the plugin dies, for some reason.

I can try to have the screensaver toggle the touch-disable before it turns on--that might be a better approach.
thumbstump is offline   Reply With Quote
Old 10-15-2016, 10:42 AM   #10
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Quote:
Originally Posted by zxczxc View Post
Yes thanks for the work, cool!

Personally I think something like this would be best if we had to touch the touchscreen twice instead of once.
So if we want to bring up the home menu or change the page, we need to quick touches instead of one.

Do you think that would be difficult to implement?
Hmm, that's an interesting idea. I don't think it would be too hard to implement but I think it'll still result in a lot of false positives (for me, at least). I'll play around with it
thumbstump is offline   Reply With Quote
Old 10-15-2016, 10:44 AM   #11
knc1
Ex-Helpdesk Addict
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 13,862
Karma: 15332067
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by thumbstump View Post
I'll look into this (and thanks @zxczxc for the code I might use).

The problem is, the program would have to check if it's in screensaver mode every touch and if there's a lot of computation in the event capture loop, the plugin dies, for some reason.

I can try to have the screensaver toggle the touch-disable before it turns on--that might be a better approach.
Even better, have the touch-disable wait on 'going to screensaver' event.

It is an event driven system, the 'wait event' part of the system is efficient.
knc1 is online now   Reply With Quote
Old 10-15-2016, 10:48 AM   #12
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Quote:
Originally Posted by knc1 View Post
Even better, have the touch-disable wait on 'going to screensaver' event.

It is an event driven system, the 'wait event' part of the system is efficient.
Can you tell me more about this? Everything I've done (kindle-hacking-wise) thus far was only to get this plugin working. Is there a C API for waiting for Kindle events. Where can I go to learn more about this?
thumbstump is offline   Reply With Quote
Old 10-15-2016, 12:38 PM   #13
knc1
Ex-Helpdesk Addict
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 13,862
Karma: 15332067
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Go to the command line of your Kindle.
Type:
lipc-wait-event
or
lipc-get-prop
or
lipc-set-prop

You could also search the Wiki - this is a very basic component of the system, a lot has been written about it.

'lipc' is a Kindle specific wrapper on the system d-bus
knc1 is online now   Reply With Quote
Old 10-16-2016, 09:13 PM   #14
Jiu
Junior Member
Jiu began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2016
Device: Kindle Voyage
Thanks so much for sharing! This was what I was looking for.

However, I'm running into a bug where if I'm reading an article/doc that has links and I turn off touch mode, the hardware buttons (next page button) either opens up the next link or opens up the menu instead of going next page. And then it ends up being stuck at no touch mode until I turn off and on the screen or hard restart the device.

When I read a book with no links it seems fine though. Can you please help? I can help if more info is needed.
Jiu is offline   Reply With Quote
Old 10-23-2016, 01:19 PM   #15
thumbstump
Junior Member
thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.thumbstump ought to be getting tired of karma fortunes by now.
 
thumbstump's Avatar
 
Posts: 8
Karma: 415222
Join Date: Oct 2016
Location: NY
Device: Kindle Voyage
Quote:
Originally Posted by Jiu View Post
Thanks so much for sharing! This was what I was looking for.

However, I'm running into a bug where if I'm reading an article/doc that has links and I turn off touch mode, the hardware buttons (next page button) either opens up the next link or opens up the menu instead of going next page. And then it ends up being stuck at no touch mode until I turn off and on the screen or hard restart the device.

When I read a book with no links it seems fine though. Can you please help? I can help if more info is needed.
Hmm, for some reason I can't replicate this. I'll let you know when I do
thumbstump 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
Disabling touch page turn on the Voyage mrcarlsen Kindle Developer's Corner 7 10-07-2016 03:44 PM
Want to turn off backlight with JB – PW3 or Voyage? Annor Kindle Developer's Corner 53 08-19-2016 04:39 AM
Voyage page turn buttons experiences? j.p.s Amazon Kindle 72 11-09-2014 12:31 PM
Can you turn off the touchscreen? (i62HD Firefly) ChristineGER Onyx Boox 0 02-14-2013 12:01 PM
How useful is the 3G capability of Kindle? ovaldisk Amazon Kindle 72 08-09-2011 05:48 PM


All times are GMT -4. The time now is 01:18 PM.


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