Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code has wrong keyboard shortcut layout

I'm using a US keyboard for coding. But my VS Code installation is using a different shortcut layout. How can I switch to US keyboard shortcuts?

like image 301
Lars Melander Avatar asked Dec 12 '19 10:12

Lars Melander


People also ask

How do I change my keyboard layout in VS Code?

Customizing Shortcuts All keyboard shortcuts in VS Code can be customized via the User/keybindings. json file. To configure keyboard shortcuts the way you want, go to the menu under File > Preferences > Keyboard Shortcuts. This will open the Default Keyboard Shortcuts on the left and your User/keybindings.

How do I customize keyboard shortcuts in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.


2 Answers

I had the same issue as I code with DVORAK keyboard layout and setting "keyboard.dispatch": "keyCode" in VS Code solved my issue.

like image 118
gruvw Avatar answered Sep 29 '22 11:09

gruvw


Yes, turned out this page had the answer:

https://github.com/Microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings

Specifically, running

setxkbmap -layout us

solved my problem.

like image 29
Lars Melander Avatar answered Sep 29 '22 11:09

Lars Melander