Search code examples
javascriptgoogle-chromegoogle-chrome-extensionbrowser-action

How can I specify a hotkey for my browser action?


Is it possible to specify a hotkey that will activate a Google Chrome browser action?


Solution

  • No, you can manipulate almost every other aspect of the browserAction and the popup (including closing it) but it cannot be triggered programatically.

    @hamczu is right that the only way to bind global keyboard shortcuts is to inject a Content Script that listens for keystrokes in every page.

    However you will not be able to make those keystrokes (or anything else) trigger the browserAction.