37

I'm working on a web application and I'd like to add some keyboard shortcuts. Things like Ctrl-N, or Ctrl-Space. However, I do not want to use a keyboard shortcut that's already used by the browser.

For example, using the Ctrl-Space shortcut in Google Chrome on OS X is fine, but in Firefox on OS X it brings up a right-click menu in the browser.

Is there a known list of cross browser/OS keyboard shortcuts that are safe (or unsafe) to use for web applications?

Alana Storm
  • 164,128
  • 91
  • 395
  • 599

2 Answers2

30

If you need to know only standard browser keyboard shortcuts, they are listed here.

Separate browser's shortcuts lists:

And I find this comparison table ugly, but very useful.

Dovydas Navickas
  • 3,533
  • 1
  • 32
  • 48
  • 1
    This is (at least any longer) not a complete list, especially if you include things like Chromebooks – Zach Saucier Jun 23 '16 at 23:57
  • Wow, that comparison table is missing at least 9 (of the most useless) shortcuts in Chrome, specifically Ctrl+# where # is in 1..9 – Michael Aug 28 '22 at 19:22
11

If there is no input focus, you should use plain keys, e.g. a, s, d, etc.

Otherwise, here is the short list of open keyboard shortcuts. They were mostly derived from Chrome (OSX), with additional eliminations made from F. David McRitchie's Comparison Table, and contributions from @leonbloy, @KnowYourElements, and @Dietmar in the comments.

This list does not consider Alt/Option since they are less familiar and often less ergonomic for users, but most of them are open.

// (Ctrl ≅ ⌘ on OSX)
Ctrl + Shift + F
Ctrl + Shift + L
Ctrl + Shift + O
Ctrl + Shift + S
Ctrl + Shift + U
Ctrl + Shift + Y

Please comment if any of these are not available on Windows or other browsers, and I will edit the list accordingly.

Raine Revere
  • 30,985
  • 5
  • 40
  • 52
  • Please refrain from using plain keys, it breaks expectations that only modifier keys + enter are used to execute state changes. – Rescribet Mar 25 '20 at 10:33
  • 4
    @Fletcher91 I'm not aware of such expectations. Plain key state changes are common. For example, in Gmail '#' deletes, 'e' archives, 's' stars, etc. – Raine Revere Mar 26 '20 at 14:59
  • 1
    `Ctrl + Shift + E` `Ctrl + Shift + K` used in Firefox – leonbloy May 09 '20 at 22:32
  • 1
    `Ctrl + B` is used in Firefox as bookmark. – KnowYourElements Apr 29 '22 at 13:42
  • about using plain keys, it sometimes/often happens to me (so I assume it also happens to others) that I start typing and am not inside a form field. This has more than once made unwanted changes in JIRA for example, where plain keys are also used for shortcuts. I agree that this is more my fault than the program's, but it does happen and would be good to take into account if people can type things on your page – Thomas Mulder May 04 '22 at 08:07
  • so uh... am I reading correctly that there are only *seven* Ctrl based shortcuts that are safe to use? – Michael Aug 28 '22 at 19:07
  • 1
    Ctrl+U is used in Firefox and Chrome to display the page source code. Ctrl+I is used in Firefox to display page info (https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly) – Dietmar Jul 07 '23 at 15:29