Use the arrow keys to go to the next and previous pages
Niccolo Florence commented
I'd really like a feature like this, but Comic Rocket would need to be careful to avoid keyboard shortcut conflicts. I think pretty much every comic should have a feature like this, but some comics already do have some keyboard shortcuts, and they often do it in different ways. For example, I'm interested in experimenting with "infinite canvas" layouts in my own comic, so right now the arrow keys are mapped to smooth scrolling both vertically and horizontally; instead, "n" and "p" take you the next and previous posts.
It would be great if Comic Rocket could help bring consistency to keyboard navigation, but it would also be annoying if Comic Rocket's settings were to override the navigation on the original site.
Roger McCoy commented
I'm fine with the keys no longer working if focus is lost. Most sites where I'd do this tend to be one-screeners.
There's also some potential for confusion if the site itself uses the same keys for the same function (the comic would change but the marker wouldn't), but I can live with that too.
Regarding the cross-site scripting limitations: Even if it required to keep the comic rocket bar focused, I'd still like the suggested implementation, where the arrow keys control scrolling (up/down) and prev/next nagivation (left/right). Would that be possible?
At that point also some speedup could be achieved by loading the next page in the background, as done by the Android app.
I couldn't get the posted user-script to work or in some cases couldn't even access the linked website. Hence I wrote a rough AutoHotKey script (Windows only):
I extended my userscript with the following features:
- Jump to page (and optionally mark it at the same time)
- Mark current page
- Go to "My Comics"
Jonathan Gawrych commented
TorbenB beat me to the punch on making a userscript
The main problem is you can't implement this just on comic-rocket alone. Due to security features, key presses could not be registered, cross-domain, through the iframe. Greasemonkey can't even bypass the same-origin policy problem (other than that nice hack of running the script everywhere (@match http://*/*))
comic-rocket would either have to do one of the following:
- Settle with allowing navigation if and only if the navbar frame or the main page was in current focus (if you click on the comic's page, navigation would no longer work)
- Proxy every single webpage to avoid same-origin (massive overhead and not viable)
- Promote/Use TorbenB's userscript
- Develop a add-on extension that allowed bypassing same-origin policy (but only in this very specific case)
It's a headache, and there are some tradeoff, but it could be done.
I created a userscript for keyboard navigation:
The keys to use for navigation can easily be adjusted in the script (e.g. to J/K if needed).
Default keys are:
RIGHT: Next page
LEFT: Previous page
SHIFT + LEFT: First page
SHIFT + RIGHT: Last page
CTRL + ALT + M: Jump to mark
Togald Nilsson commented
Just as Sam H. said, don't interfere with the browser hotkeys. https://comicrocket.uservoice.com/forums/70859/suggestions/5597856
Sam H. commented
Lemme take a second to plug my suggestion:
"Use J and K keys to go to next and previous page"
J/K are used on tons of other sites (Google+, The Old Reader, Facebook, etc.) and they don't interfere with horizontal scrolling the way that arrow keys do.
Using the arrow keys is a annoyance in the best case. The problem with it is that it hijacks the keys used for navigation. Some browsers don't even let you do it.
And before anyone suggests it, the "shift", "ctrl" and "alt" modifiers with the arrow keys are already taken.
If you could go with A and D (like on the WASD) instead of Left and Right I'd be quite happy. I use a laptop with a little red dot and no scrollwheel or middle click, so I use the arrow keys to navigate and scroll around the pages a lot.
Being able to change hotkeys would make this feature perfect.
this would make the site perfect !
Would like this idea, but not using the arrow keys. I prefer to use the arrow keys to adjust the page (ie scroll down or to the side when viewing in a window that cannot display the full page) Something like is done with the reddit enhancement suite, navigating via certain letter keys but still allowing the arrow keys for navigating the page itself.
Raymond Burke commented
This is kind of important. Using the bar to go through pabe by page is easy if there's 50 pages, just doable with 500 pages, and I'm willing to bet fairly impossible if there's 5,000 pages.
Arrow Keys to go to next and previous pages would be fabulous. (Aka, something like the Imgur interface)
Laurent Stanevich commented
It just seems crazy that there's not _some_ kind of keyboard shortcuts to navigate back and forth between pages in a comic.
Preferably global hotkeys which do not need focus, so when I am playing a full screen game I do not need to Alt-Tab out and back in.
This would be really handy for playing games with long turn times.
Some other keyboard shortcut would be OK as well.
Simon Labone commented
+1. While focus stays on Comic-rocket nav, arrows for next/previous and up/down for scroll..