mokuro
mokuro copied to clipboard
Changing page with arrow keys.
Hey there, love the application. I will be using it daily from now on. One thing I noticed while using it today was that using the arrow keys moves the orientation of the page and doesn't change to a new page as I would expect. Would this kind of functionality be welcomed?
The about/help menu within the image viewer displays a list of shortcuts for navigation. What you're looking for is the pageup/pagedown keys or the home and end keys.
Not all keyboards have those keys, though.
I find the current navigation pretty counterintuitive. When I use left/right arrow keys, I expect to move to the next/previous page, not to move left/right in the current page, and when I scroll, I expect to move left/right/up/down in the page, not to zoom in/out.
@nienkeboomsma just FYI I found that even though it isn't mentioned above, you can also move to the next page with space if that is helpful!
create a userscript using tampermonkey or sorts and paste this in:
document.addEventListener('keyup', function (e) {
if (e.key === 'ArrowLeft' ) document.getElementById('leftAScreen').click();
else if (e.key === 'ArrowRight') document.getElementById('rightAScreen').click();
});
you can workaround with a little js, open your html file or js file, find the code below and edit it
pz = panzoom(pc, {
bounds: true,
boundsPadding: 0.05,
maxZoom: 10,
minZoom: 0.1,
zoomDoubleClickSpeed: 1,
enableTextSelection: true,
// add this option
filterKey: function( e, dx, dy, dz ) {
// don't let panzoom handle this event:
return true;
},
document.addEventListener("keydown", function onEvent(e) {
switch (e.key) {
// change to any key you want
case "ArrowRight":
prevPage();
break;
case "ArrowLeft":
nextPage();
break;
case "9":
firstPage();
break;
case "3":
lastPage();
break;
case " ":
nextPage();
break;
case ".":
zoomDefault();
break;
}
});