Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Screenshot

screenshot of the keyboard shartcuts help overlay

About

This is the official keyboard shortcuts script for the Stack Exchange sites, as announced on Meta Stack Overflow. It is still in active development, and will eventually move from being a user script to being a full-blown (optional) feature when it is ready for that.

Download

Use one of these two links to install:

After installing (and possibly restarting/refreshing), pressing ? should get you started.

(When installing, remember to disable conflicting keyboard shortcut scripts you may be running.)

Platform

Should work in Chrome, Firefox (with Greasemonkey) and Opera (where you'll have to manually move it to your user script folder). May also work in other browsers; see the tag wiki of the tag.

Contact

Feedback is very encouraged – keyboard shortcuts are a power user feature, so we have to know what those power users actually need. Please leave or vote on feedback on the Meta question.

share|improve this question
    
Self-updating script eh? I have prior art on that one, but I guess you did help me a teeeny bit :D –  Benjol Sep 1 '11 at 12:24
    
@Benjol: Er, uhm... –  Nathan Osman Sep 1 '11 at 14:00
    
@George, ok, I'll share the patent with you both (gist.github.com/874058) :) –  Benjol Sep 1 '11 at 18:53
1  
I have to press shift+? to get the help in chrome 14 –  Zypher Sep 2 '11 at 15:10
3  
@Zypher that's a joke, no? What keyboard layout has the ? key in normal state? –  sehe Mar 26 '12 at 17:02
    
Is there any way we could get this for the review screens? Specifically close votes? –  Undo Dec 7 '13 at 3:02
add comment

8 Answers 8

Can I get a way to configure which keys do what? I like to have all the most commonly used keys clustered in one place: it's hard to use SO with a drink in my hand if I have to use both hands to do anything.

share|improve this answer
add comment

I have peculiar issue with script somehow inserting itself into editors on completely unrelated sites. It seems to especially love to wreck WordPress and Basecamp posts.

Here is screenshot from my local WP development site, right after adding new post and switching to code view:

SE hotkeys script in my WordPress

Opera 12.16, Win7x64

share|improve this answer
1  
Confirmed. Workaround: use a separate user script directory for stack sites. –  toscho Feb 4 at 19:32
add comment

When you are viewing a question list that updates via the live question bar ("N question(s) with new activity") and you use the mouse to click and load the new question(s), then the JS model as seen by the keyboard shortcut code is not updated. As a result, the newly loaded questions cannot be navigated over.

Thus, U goes to the question that was top-most before you clicked on the new questions link, and K will not move the question indicator any higher.

share|improve this answer
    
Yeah, at the moment that only works when you load the new questions via the keyboard shorttcut (F). This is on my list, though. –  balpha Jun 24 '12 at 22:22
    
At least it auto-corrects the next time there are new questions to load and you hit F; the previously unreachable questions are then navigable again as the new items have loaded. –  Martijn Pieters Jun 25 '12 at 9:44
    
For completeness: I fixed this a few days later in bitbucket.org/balpha/se-keyboard-shortcuts/commits/… –  balpha Nov 28 '13 at 13:45
    
This is still an issue, I am afraid. –  Martijn Pieters Nov 28 '13 at 14:43
    
My bad, now fixed in bitbucket.org/balpha/se-keyboard-shortcuts/commits/…. –  balpha Nov 28 '13 at 16:00
    
Thanks, the new fix indeed works. Clicking on the link now lets you navigate the newer posts too. –  Martijn Pieters Nov 28 '13 at 16:07
add comment

After loading newly-posted answers with F they are not navigable with the J and K keys. Only items already loaded with the page are keyboard-navigable.

share|improve this answer
    
    
Thanks, confirmed fixed! –  Martijn Pieters Nov 28 '13 at 14:42
add comment

I love keyboard navigation, +1 to infinity for this feature!

I have but one request: I usually open up questions in a new tab, from the newest or active questions pages, for example.

Normally, on Mac, I'd hold down the (command) key while clicking on the link, or use the TAB key to shift focus to the link and use -ENTER to open the link in a new tab.

However, with the keyboard extensions, when a question has been selected (after pressing U, first question for example), there is no link focussed and the -ENTER will not open the question, at all.

Could this be implemented in the keyboard extensions? This probably has to be platform dependant, as the modifier key for Windows and Linux would be different.

share|improve this answer
1  
This works, but we have decided to go with Shift as the modifier key, since there's less of a collision chance. Shift-Enter will open in a new tab (it also works in a few other places, e.g. G Shift-P opens your profile in a new tab). –  balpha Jun 22 '12 at 13:03
    
Okay, didn't know this. Does the short-cuts help window update if you hold the Shift key down (like Mac menus do)? Note that on Mac (Firefox), the Shift modifier normally means 'new window', not 'new tab', so that's inconsistent with "normal" operations. –  Martijn Pieters Jun 22 '12 at 13:07
    
Actually, with the most recent version of the script, ? doesn't work at all. –  Martijn Pieters Jun 22 '12 at 13:11
    
Regarding the inconsistency -- yes, we decided to live with that, in particular since hardly anybody uses "new window" anymore these days. Regarding ? -- hmm yeah, I must have just broken that. Will fix. –  balpha Jun 22 '12 at 13:14
    
Fixed, thanks for noting. –  balpha Jun 22 '12 at 13:20
    
Confirmed, thanks! I now also realize that updating the help window when Shift is pressed won't work as you'd be holding the Shift when opening the popup in the first place (Shift-/ makes ?). –  Martijn Pieters Jun 22 '12 at 13:36
add comment

Please add a consistent shortcut to reach the (new) review queues.

With consistent I mean one that is there on all sites. Currently, I can go to the review page on Programmers.SE and here on StackApps, where I can type GSR for go to... -> special pages... - review.

But the same option isn't available on MSO or on SO. On SO, the special pages... listing gives me the option to go to suggested edits and flags, MSO has no special pages... option at all. Either my reputation level prevents me from seeing the review option on those sites, or they have been configured differently to alter the keyboard shortcut script's behaviour.

share|improve this answer
add comment

Using Shift-ENTER opens questions in a new tab.

However, the same does not apply to the other options. Could this be extended to any of the options that load a new page? So, hit i for inbox, then Shift-1 to open the first inbox message in a new tab.

Preferably, I'd still like to see this using the native 'open in new tab' modifier key (CMD on Mac for example), instead of using Shift.

share|improve this answer
add comment

Fantastic addition to the site, hands down. I just browsed for half an hour with nothing but the keyboard.

  • Took about 10 minutes to get accustomed to the controls
  • Voting is a snap, and I feel more likely to vote on more answers because I can quickly zip through them without reaching for my mouse
  • Easier to get a comment or answer started

The only suggestion I would have is adding a shortcut for jumping out of the answer/comment textbox without having to tab over to the "post" button. Can be kind of annoying when I accidentally hit "enter".

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .