Search code examples
visual-studio-codeshortcutkey-bindings

Double same key keyboard shortcuts


Is there a way to use the same key for a shortcut? For example, on Mac, IntelliJ uses shift shift (double tap the shift key) for searches. I would like to mimic that function in VSCode, but it doesn't appear to accept that as a valid shortcut. I can save it, but nothing happens when I try to use it.


Solution

  • It is possible, with VSCode 1.54 (Feb. 2021)

    Modifier only keybindings

    It is now possible to define keybindings for duplicate modifiers:
    e.g. shift shift, alt alt, ctrl ctrl or cmd cmd / meta meta / win win.
    These keybindings can be entered manually in keybindings.json. e.g.:

    { "key": "shift shift", "command": "workbench.action.quickOpen" }