亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - chrome plugin: listen for keypresses when address bar foucs
僅有的幸福
僅有的幸福 2017-05-19 10:21:53
0
1
602

Problems encountered when making a chrome plug-in:

Is it possible to monitor shortcut keys (such as ctrl s) when the input focus is on the address bar to operate documents on the page?

僅有的幸福
僅有的幸福

reply all(1)
某草草

Shortcut key registration

      {
        "name": "My extension",
        ...
        "commands": {
          "toggle-feature-foo": {
            "suggested_key": {
              "default": "Ctrl+Shift+5"
            },
            "description": "Toggle feature foo",
            "global": true
          }
        },
        ...
      }

Monitor input

chrome.omnibox.onInputStarted.addListener(function callback)

Change some flags when typing, save them to storage.local, and then detect them during the shortcut onCommand

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template