Open a Chrome Extension popup with a keyboard shortcut?

I know that we cannot open the chrome popup extension directly from javascript. But is there a way to open a popup when the user presses some key combination?

+4
source share
1 answer

The chrome.commands api allows the user to bind hot keys that will launch commands such as opening a browser action.

Example: https://developer.chrome.com/extensions/samples#search:commands (press Ctrl + Shift + F (Command + Shift + F on Mac) to open a browser action popup, press Ctrl + Shift + Y, to send an event (Command + Shift + Y on Mac))

+5
source

Source: https://habr.com/ru/post/1652801/


All Articles