chrome.commands keyboard shortcuts not working

前端 未结 10 1331
有刺的猬
有刺的猬 2020-12-03 07:57

I am trying to add some keyboard shortcuts to my Chrome extension, specifically to allow the user to use hotkeys to open up a browser action/popup. I\'ve read the d

10条回答
  •  孤街浪徒
    2020-12-03 08:26

    Your (and my) Command+Shift+Y keystroke is likely being used by another OSX app (possibly stickies).

    This works on my Mac/Chrome combo (changed the Y to U):

    "browser_action": {
      "default_popup": "browser_action.html"
    },
    "commands": {
      "_execute_browser_action": {
        "suggested_key": {
          "default": "Ctrl+Shift+U",
          "windows": "Ctrl+Shift+U",
          "mac": "Command+Shift+U",
          "chromeos": "Ctrl+Shift+U",
          "linux": "Ctrl+Shift+U"
        }
      }
    }
    

    Does it work for you?

提交回复
热议问题