Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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"

like image 644
Kevin Avatar asked Jan 21 '18 16:01

Kevin


People also ask

How do I enable Vim mode in VSCode?

You can use a keyboard shorcut for toggleVim command with the help of keybindings in VS code. For example, here I want to use Ctrl+Alt+V to toggle Vim mode on/off. To do this I add the following to keybindings. json and save the file.

How do I change the shortcut key in VSCode?

All keyboard shortcuts in VS Code can be customized via the keybindings.json file. To configure keyboard shortcuts through the JSON file, open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar.

What is Vim extension in VSCode?

VSCode Neovim IntegrationNeovim is a fork of VIM to allow greater extensibility and integration. This extension uses a full embedded Neovim instance, no more half-complete VIM emulation! VSCode's native functionality is used for insert mode and editor commands, making the best use of both editors.


1 Answers

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.

like image 56
NaN Avatar answered Nov 05 '22 07:11

NaN