Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome extension commands (keyboard shortcuts) not working

Any idea how I can get Chrome extension keyboard shortcuts working on a Mac? I have this in my manifest.json

"commands": {
  "trigger_me": {
    "suggested_key": {
      "default": "Ctrl+E"
    },
    "description": "Trigger test"
  }
}

When I look in the Chrome Extensions tab under Keyboard shortcuts I can see the 'Trigger test' entry but the actual shortcut is not set.

How can I set a default shortcut via manifest.json?

like image 329
MB. Avatar asked Dec 21 '13 18:12

MB.


People also ask

Why are my keyboard shortcuts not working in Chrome?

Why is Chrome shortcut not Working? Google Chrome shortcuts are not working because of the software Update. Shortcuts are not working in Modern UI by default and don't allow users to launch any shortcut programs. Sometimes Overloaded junk files and cache can prevent shortcuts to work.

Why are my keyboard shortcuts not working?

Keyboard shortcuts could fail to work if you don't press the key combinations at the same time. If you are having difficulties pressing multiple keys at the same time, you should enable Sticky Keys. This Windows 10 feature allows you to press the shortcut keys one after another.


1 Answers

As the manifest key name implies, suggested_key is only a suggestion for key binding. That suggestion will be taken into consideration only if the key is not already assigned to another command. In a Mac, "Ctrl+E" translates to "Command+E", which is assigned to "Uses selection for find".

You can review the list of commonly assigned shorcuts to find some combination that is unused. For instance, "Ctrl+Shift+K" worked for me.

Another thing to have in mind is that suggested keys are only considered when an extension is first installed. Disabling and enabling, updating, or reloading won't have any effect. So if you just changed the suggested key in your manifest and want to test it, you have to uninstall the extension and install it again.

like image 131
rsanchez Avatar answered Sep 20 '22 03:09

rsanchez