Control + z is not working in visual studio code. I have opened the VS code keyboard shortcut detector, ctrl can get detected, z can get detected, z+ ctrl can get detected, ctrl+ z failed. It seems after I press ctrl, z will get blocked. However, for others key combinations, they are all good in VS code. I even tried to use on-screen keyboard to input ctrl-z to VS code, still not detecting.

However, I have tried ctrl-z in onenote, it is good.

What I have tried: I have tried changing language to reset keyboard, not working I have tried clean boot of win 10, not working I have tried creating a new windows user, it works! But, I don't want to use another account and migrate all my data and programs, besides, I don't want to lose my current account email.

  • Adding more information: VS code version is 1.51.1 .
    – Lyu Chang
    Dec 1, 2020 at 4:31

3 Answers 3


I had the same issue. You can reset your Keybinds in Visual Studio.


1) go to Tools -> Options -> Environment -> Keyboard. Or by type "keybindings" in the Search.

2) Then on the right you can just reset" all of your keybinds (easy). Or assign them again(if you assinte different keybinds before).

  • By typing "undo" on the right in the first text box. then you see " Edit.Undo. Then just press Ctrl + c -> assign.

3) Restard your Visual Studio and be happy that your handicap is gon.

If it is not fixt, then try it agen.

Else i dont know.

If you have problems with other keys do the same by searching your keybind on internet "What is the name of control + c" = "Undo". Or just reset your ALL of your keybinds.


I had the issue as well. For me it was that I have a German keyboard layout (z and y changed position in comparison to English layout). While typing in the editor z and y were in the correct position but for whatever reason they were flipped again when hitting ctrl in advance. So I worked around it by changing the commands. Typing ctrl+z resulted in ctrl+y and vice versa.

Edit: You can change the keyboard shortcuts in Settings>Keyboard Shortcuts


Go to File > Preferences > Settings search Keyboard.

On application > Keyboard tab, you have a selector as you can see in this screenshot

Selector in Settings > application > keyboard

I switched the value of this selector from code(default) to keycode.

Now it works with my keyboard in French layout.

New contributor
Max Cmt is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.