使用 Chrome 命令 API 收听双击按键

Listen to double key press using Chrome Commands API

有没有一种方法可以使用 Chrome 命令 API.

来监听双击按键

例如,我想在用户双击 shift 键时打开搜索 window。

我试过了;

"commands": {
    "_execute_page_action": {
        "suggested_key": {
            "default": "Shift+Shift"
        },
        "description": "..."
    }
}

但正在尝试加载以下扩展 returns;

Failed to load extension from: /example_path
Invalid value for 'commands[1].default': Shift+Shift.

来自文档:

Supported keys: A-Z, 0-9, ,, ., Home, End, PageUp, PageDown, Space, Insert, Delete, Arrow keys (Up, Down, Left, Right) and the Media Keys (MediaNextTrack, MediaPlayPause, MediaPrevTrack, MediaStop).

Note: All key combinations must include either Ctrl* or Alt.

您可以阅读有关命令的更多信息 API here