Use in Visual Studio Code (Vim extension) CAPS instead of ESC

Kevin picture Kevin · Jan 21, 2018 · Viewed 10.5k times · Source

I use Debian and I switched from Vim to Visual Studio Code, when I noticed, that there is a Vim movement extension for VS Code from vscodevim. While I was using Vim, I mapped my Caps lock key to the ESC key. In Vim it works perfectly, but VS Code is not reacting on a Caps lock input.

I hope there is a solution. If there are any questions feel free to ask.

This is how I changed my keyboard layout: I navigated to /etc/default/ and edited the keyboard file. This is how it looks now

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT=""
XKBOPTIONS="caps:escape"

BACKSPACE="guess"

The Caps lock key works also in other programs e.x. "Synaptic Package Manager"

Answer

NaN picture NaN · Jun 15, 2018

Late answer, but mayby it is useful for someone:

Switched CAPS and ESC in Ubuntu (17.10) over the keyboard preferences section. Worked in almost all applications, but not in Visual Studio Code. So I modified VS Code settings

{
  "keyboard.dispatch": "keyCode"
}

and it worked.