Chrome Extension: I am looking for a way to assign global keyboard shortcuts that can be invoked even when the current tab has no content (and hence no content script). Some examples of such tabs: 'new tab' tabs, chrome://extensions tabs, 'page not loaded' tabs, etc Use cases for such a requirement are operations like close tab, go to next/prev tab, etc.
The chrome.commands api allows one to do this. However, there seems to be no way for the user to configure these keyboard shortcuts, which is something I'd really want my extension to allow.
Is there any way to get configurable keyboard shortcuts that don't need a content script?
The shortcut for chrome.commands
cannot be changed by the extension, but it is configurable by the user. This interface is built-in and offered by Chrome itself.
Visit the extensions page, scroll down and click on the Configure commands link. A box will be shown, where the user can set the preferred shortcut:
The code for the "Remap shortcut" extension is posted in this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With