I've found a way to run KindleLauncher with swipe over Menu button. Tested on Kindle Touch 5.3.2.
Run provided shell script (make sure
launcherPath is set to path of your KindleLauncher) and then swipe over Menu button in search bar, starting from top or right. It works even in browser. It will work until Pillow restart, so it's enough to run script only once after reboot.
Simple press on Menu button will work as usual.
It's possible to implement toggling of this additional functionality without reloading of Pillow, but ATM disabling isn't implemented and could be done only with
restart pillow (
UPD: toggling is implemented in
another version made for using in Upstart script). This script is a simple POC, so there could be also other quirks.
Spoiler:
Code:
SCRIPT=`cat << 'JAVASCRIPT' | tr -d '\n' | sed -e 's,",\\\\",g'
(function () {
var launcherPath = "/mnt/us/documents/KindleLauncher-2.0.azw2";
var menuButton = document.getElementById("menu");
var swiped = false;
var launcherApp = "file://" + launcherPath;
menuButton.addEventListener("mousedown", function () {
swiped = true;
});
menuButton.addEventListener("mouseup", function () {
swiped = false;
});
document.body.addEventListener("mouseout", function () {
if (swiped) {
swiped = false;
nativeBridge.setLipcProperty(
"com.lab126.appmgrd",
"start",
launcherApp
);
}
});
})();
`
MESSAGE='{
"__id__": "0",
"pillowId": "search_bar",
"replySrc": "",
"function": "'${SCRIPT}'"
}'
lipc-set-prop -s com.lab126.pillow interrogatePillow "$MESSAGE"