Next Image/Previous Image

By Artemy Tregoubenko Last update Oct 5, 2009 — Installed 670 times.

Prefer to use N/P keys?

in
Subscribe to Prefer to use N/P keys? 2 posts, 2 voices



joeytwiddle Scriptwright
FirefoxX11

The default keys are F and R. I guess they stand for Forward and Reverse.

I had a lot of trouble remembering the keys, I was expecting N and P like the Next and Previous in the script name!

I did a quick Google for "javascript keycodes" and found out that N has keycode 110 and P has keycode 112. (For keyboard events we need to use the uppercase keycode.)

So this small change to the code will change the keys to N and P:

var rButton = 112;   // "reverse" button = P
var fButton = 110;   // "forward" button = N

 
Artemy Trego... Script's Author
OperaX11

Hi,

The choice of hotkeys was made by analogy to Opera's hotkeys Q/A, W/S, E/D which help you navigate by links, headers, and paragraphs. R/F are just next buttons to these.

Please feel free to manually adjust your copy of script!

Thanks for suggestion!

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel