What are cross-browser and cross-OS safe keyboard shortcuts usable for web application?

I wouldn’t count on it. It’s probably okay to listen for shortcuts that use the Alt modifier, but there’s still no way to be sure a keyboard shortcut is free. Users can always install programs that listen for keyboard shortcuts, or use a browser you didn’t expect.

If the shortcuts can be used only when the user is not typing in a textbox or something, it might be a better idea to just listen for keys pressed without a modifier key.

If no textbox or other GUI element is focused, then document.activeElement == document.body should be true (somebody correct me if I’m wrong).

Leave a Comment