This extension provides the default key bindings for Windows on any platform. Currently, these are the defaults for VSCode 1.101.0. This is useful if you want to run VSCode on another platform but continue to use the bindings that are the defaults on Windows (e.g., here and here). This extension does not remove any existing bindings. On Windows, that means you have everything bound twice. On other platforms, you have that platform's default bindings plus the Windows ones. The bindings in this extension take precedence over the defaults provided by VSCode. Example screenshot running on Linux: InstallationFrom within VSCode, go to extensions (Ctrl+Shift+X), search for "Windows Default Keybindings", click on it, then click on Install. The new bindings should be active immediately. Alternatively, install it from the Marketplace page, or download the VSIX file from the Github releases page and then use "Install from VSIX..." menu option from the "..." menu in the Extensions page. Some problematic keybindings and workaroundsThe basic goal of this extension is to allow VSCode users who are accustomed to the keybindings on Windows to use it on other platforms with the same keybindings. However, sometimes the bindings conflict with something else on the other OS, or don't work for some other reason. In this section I have collected together some workarounds, but be aware that I haven't personally tested all of them. Ctrl + Alt + Up/Down/RightOn Windows, Ctrl+Alt+Up and Ctrl+Alt+Down enter multi-column select mode, and Ctrl+Alt+Right splits the editor pane vertically. On some Linux distributions, the window manager by default intercepts these key combinations. On Ubuntu 22, to disable the offending window manager bindings and allow VSCode to see them, run at a shell:
On Mint 20, run:
Ctrl + Left/Right on MacOSOn Windows, Ctrl + Left/Right moves the cursor by one word to the left or right,
including in the Terminal window. However, reportedly on MacOS, these key bindings
do not work in the Terminal. Insert the following snippet into
Home and End in Terminal on MacOSOn Windows, the Home and End keys move to the start and end of line in a
Terminal window. This behavior isn't due to a normal VSCode binding (it
probably comes from the underlying GUI library), so this extension
doesn't replicate that behavior (since it just copies all normal
bindings), and consequently those keys do nothing in the VSCode Terminal
window on Mac. In order to bind those keys, you can add to your
The above assumes you are using How it was createdFor the curious or adventurous, the procedure I used to create this extension is:
Removing identical bindingsThe above was how the extension was originally created. However, as shown in [Issue #11](https://github.com/smcpeak/vscode-default-keys-windows/issues/11), there is a problem when some other extension wants to override a key that has a default binding, since there is no way to specify a priority order for extension keybindings. This extension may inadvertently block the other extension's binding from working due to effectively re-inserting the default binding. Although not a complete solution, I've chosen to write a script to
compare the bindings on Windows, Linux, and MacOS, and then have this
extension not bind any keys whose default bindings are identical on all
three platforms. Consequently, "tab" is not bound by this extension
anymore. See the Interested in helping to maintain this?I created this extension as a proof of concept answer for a Stack Overflow question. Unexpectedly, it came to be relied upon by a large number of users (over 50k downloads). The extension requires periodic updates to track the default VSCode
Windows key bindings, and I'm looking for volunteers to help with that.
If you're interested, a good first step would be to submit a pull
request that updates the bindings to the current version of VSCode.
Look at the revision history for examples of past updates, and read
|