Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to allow web apps to overwrite built-in keyboard shortcuts #446

Open
filips123 opened this issue Jan 15, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@filips123
Copy link
Owner

Problem Description

Some web apps use shortcuts that may conflict with standard Firefox shortcuts for their functionalities. To use such shortcuts, users need to disable them in the app browser settings.

One such shortcut is Ctrl+W. Since it is often used by Firefox users to close the tab (or window), it should be enabled by default. However, other users might expect that web apps can automatically handle it themselves without needing to disable it in the app browser settings (#443), so neither enabling nor disabling it by default is a perfect solution.

Proposed Solution

There should be an option to let websites handle such shortcuts themselves if they want but keep the normal Firefox behavior otherwise.

This might then become a default option for specific keyboard shortcuts. This way, shortcuts like Ctrl+W will still normally be handled by Firefox to close the tab, but websites will also be allowed to provide a custom handler for their functionalities, without needing to change the browser settings.

This should still be an option, because some users might want that Ctrl+W to always close the tab, even if the website provides a custom handler.

Additional Information

This can be probably done by setting reserved="false" on the key element.

Currently, shortcuts that can be disabled are close tab (Ctrl+W), close window (Ctrl+Shift+W), quit application (Ctrl+Shift+Q) and private browsing (Ctrl+Shift+P). It might be useful to expand these options to more shortcuts, in case there are other shortcuts that web apps commonly use that conflict with built-in Firefox shortcuts.

Additionally, it still needs to be considered which of the shortcuts will have this new option enabled by default, and which will remain reserved by default.

Another thing to consider is how to implement settings UI for this. Possibly the easiest option is to add another list, similar to the existing shortcuts list, that determines just if a specific shortcut is reserved. However, this may be quite long if more shortcuts are added and possibly confusing to users (since the reserved part would not have an effect if the shortcut is completely disabled). A better option is to add some kind of three-way switch for each shortcut that determines if the shortcut is disabled, unreserved or reserved.

@filips123 filips123 added the enhancement New feature or request label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

1 participant