Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode some shortcuts not working properly

latest version 1.40.1 on Windows 7 x64. I am developing in Java.

The most common shortcut, "go to definition" F12 and "auto fix" ctrl+dot I tested it on another computer with 1.40.1. It works properly. I have follow the key binding troubleshooting guide. When I record my key ctrl+dot. It shows ctrl+oem_period. Looks like the OS is sending the correct keys to VSCode.

I couldn't find a way to reset VSCode key bindings and do not know what is actually causing this. What should I do next? Completely reinstall everything is the last resort.

like image 721
Maxi Wu Avatar asked Nov 20 '19 03:11

Maxi Wu


People also ask

How do I enable shortcut keys in VS Code?

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. This will open your keybindings.

What is Ctrl Shift P in VS Code?

You can define a keyboard shortcut for any task. From the Command Palette (Ctrl+Shift+P), select Preferences: Open Keyboard Shortcuts File, bind the desired shortcut to the workbench.

Why Ctrl D is not working in VS Code?

The main step are: File > Preferences > Keyboard Shortcuts. type "copy line",then you will see the related shortcuts. remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.


2 Answers

With the command Developer: Toggle Keyboard Shortcuts Troubleshooting, you can see which command is linked to a shortcut. It could happen that an extension is overriding the expected behaviour.

For example, I had an extension overriding the shortcut to reopen a closed tab, which didn't work anymore.

like image 79
Martin van Driel Avatar answered Oct 28 '22 19:10

Martin van Driel


Your operating system keyboard shortcut is overriding the vscode shortcut. You should check your operating system shortcut key instead.

like image 39
Potato Avatar answered Oct 28 '22 17:10

Potato