Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding "Activate the extension" shortcut to Chrome Extension

I am developing a Chrome Extension for personal use and want to add a shortcut to it to activate to popup.html page (i.e. when I press the shortcut the popup.html page will show up).

For some extension I can easily do this by going to chrome://extensions/shortcuts page and assigning a shortcut against "Activate the extension" field.

But my extension is not listed there.

Do I need to add anything to the manifest.json file for my extension to appear in chrome://extensions/shortcuts page?

like image 765
th1rdey3 Avatar asked Sep 10 '25 14:09

th1rdey3


1 Answers

The 'Best Answer' did not work for me, after a confusing 20 minutes I found out that all you need in your MV3 file is this:

"commands": {
  "_execute_action": {
    "suggested_key": {
        "mac": "Shift+MacCtrl+G"
      },
    "description" : "Start the extension"
    }
}

The catch was that I needed to fully Remove my extension and then Load unpacked for mine to work.

like image 70
Zafar Avatar answered Sep 13 '25 05:09

Zafar