views:

188

answers:

5

To send a message I usually press ctrl + enter. What other shortcuts do you think are important to implement into your webapplications?

Edit: What buttons do you think are interessting to catch with js because they aren't used by the browser?

I am not thinking of ctrl + z f.e. because the browser uses those maybe shift + [key] makes sense.

Or is space + [key] interessting?

BTW, ctrl + enter doesn't work here :(

A: 

Undo and Redo (ctrl-Z and ctrl-Y) if applicable.

Mind you, that assumes an editing context. So it really depends on what the context is as to what short cuts are appropriate.

boost
+1  A: 

See Jon Galloway's blog post Mouseless Computing

John D. Cook
+6  A: 

Shortcuts in webapps are a good idea for your power users, but there's not nearly as much agreement on them as there is on desktop app shortcuts. For desktop apps, the ctrl key standards are essentially universal:

  • z (undo)
  • y (redo)
  • s (save)
  • a (select all)
  • x (cut)
  • c (copy)
  • v (paste)
  • p (print)
  • o (open)
  • n (new item)

Ctrl-q for quit and ctrl-w for close window are almost universal, too; for mail clients, ctrl-r and ctrl-f are pretty universal for reply and forward, and ctrl-enter is send; and for browsers, ctrl-r is universally reload. There are also some F-keys that are pretty common - F1 for help, F2 for rename, and F5 for refresh.

For webapps, however, there are a few issues. One is that the browser shell you're in has its own ctrl-key shortcuts, and focus isn't always exactly what you'd expect, so using ctrl-key that the browser expects (like ctrl-r) may or may not pass the keyboard command through to the webapp's javascript (for example, depending on where your focus is when using Microsoft Outlook Web Access, ctrl-r will either reply to the message you're on, or reload the whole page). That's why many webapps use single-key shortcuts (which are not active when you're entering text, of course).

The best practices in the area (in my opinion) seem to be coming from Google, where their shortcuts in gmail and reader are both intuitive and thorough. If you want a de facto standard for web application shortcut keys, that's probably a good place to start. You can bring up the shortcut keys list in reader by pressing "?". You could do worse than mirroring some of these (especially "j" for next item and "k" for previous), as they're starting to be pretty well known.

Ian Varley
"j" and "k" are *starting* to be pretty well known? Son, I've been using them in vi for 20+ years.
Paul Tomblin
Your shortcuts are biased towards Windows. The type of people that uses keyboard shortcuts in browsers might use other OSes too.
J.F. Sebastian
Excellent point on both accounts. On the first, I should amend it as "starting to be well known by the general public" (as opposed to people who use text-based programming editors).
Ian Varley
And on the second, they're totally biased towards windows. To my knowledge, though, *most* of those are the same on MacOS and Linux. Care to post a quick DIFF of where either / both of those operating systems have other shortcut keys?
Ian Varley
A: 

Nearly duplicate of Keyboard shortcuts for web apps... I won't close this one since it gets more answers.

PhiLho
A: 

Use the accesskey HTML attribute abundantly. Try not to override default behaviour of browser key bindings.

ngn