Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Chrome Extension popup with a keyboard shortcut?

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

like image 420
Shubham Jain Avatar asked Aug 29 '16 06:08

Shubham Jain


1 Answers

The chrome.commands api enables the user to bind hotkeys that will trigger commands such as opening the browser action.

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

like image 90
Divyesh Kanzariya Avatar answered Oct 19 '22 23:10

Divyesh Kanzariya