Chrome extension commands (keyboard shortcuts) not working

后端 未结 1 1575
悲哀的现实
悲哀的现实 2021-01-02 10:19

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

\"commands\": {
  \"trigger_me\": {
    \"sugges         


        
相关标签:
1条回答
  • 2021-01-02 10:50

    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.

    0 讨论(0)
提交回复
热议问题