Moonchild wrote:Who decides what are "important" keystrokes?
There are two suitable approaches:
- If there is a standard for this, follow it.
- Place the user in the center of your thinking (rather than a web-app developer). What does the user expect to happen on pressing Ctrl+Tab? Almost certainly, he expects switching to another browser tab. What about Ctrl+U, for example? This is less obvious - some may expect it to underline text, while others may expect it to show the page's source code. However, displaying source code is not a very common operation (unlike switching between browser tabs), and Ctrl+U is often used in rich text editors to underline text. Conclusion: allow pages to catch Ctrl+U.
I understand that the problem is tricky - if there are conflicting keystrokes, a perfect solution does not exist. Apparently the best way to go is to allow users to configure the behavior. This might possibly be accomplished by the keyconfig
extension. The ultimate solution would be a per-keystroke configuration, i.e., the user would decide which keystrokes may be intercepted by web pages and which cannot (obviously, a reasonable default configuration would have to be provided). A simpler solution is to add to Preferences a switch like "Allow web pages to override the browser's keyboard shortcuts", i.e., one setting for all keystrokes. Maybe there is a switch like this already somewhere in about:config, but I couldn't find it.