Last updated: Apr 6, 2024
Reading time·4 min
If you need to reset specific keyboard shortcuts in VS Code:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.When the filter is applied, only keyboard shortcuts that you have modified are shown.
You can also apply the filter by typing @source:user
into the search field.
You can repeat the process for any of the user-defined keyboard shortcuts you want to reset.
If you completely want to remove a keyboard shortcut from VS Code, you would right-click on it and select Remove Keybinding.
If you need to reset all keyboard shortcuts to the default:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.keybindings.json
file, leaving just a set of
square brackets []
.[]
If you only leave a set of square brackets []
in your keybindings.json
file,
all user-defined keyboard shortcuts are reset.
You can view the default keyboard shortcuts in 2 ways:
For example, if you want to use the UI:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.You can also view the default keyboard shortcuts a JSON format.
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.Your Default Keybindings file contains an array of objects where each object is a default keyboard shortcut.
An alternative approach is to directly reset your keybindings.json
file by
editing it and setting its contents to a set of square brackets []
or removing
specific keybinding objects.
Depending on your operating system, the file is located under:
%UserProfile%\AppData\Roaming\Code\User\keybindings.json
~/Library/Application\ Support/Code/User/keybindings.json
$HOME/.config/Code/User/keybindings.json
On Windows, issue the following command in CMD to open the file in Notepad.
# Windows notepad "%UserProfile%\AppData\Roaming\Code\User\keybindings.json"
If the file doesn't exist, then you don't have any user-defined keyboard shortcuts.
Once you open the file, you can set it to a set of square brackets []
if you
want to reset all keyboard shortcuts.
You can also use the code
command to open the file in VS Code.
# Windows code "%UserProfile%\AppData\Roaming\Code\User\keybindings.json"
If you only want to reset specific keyboard shortcuts, remove the corresponding objects from the array.
On macOS, you can use the gedit
command to open the file from your terminal
(e.g. bash
or zsh
).
# macOS gedit "~/Library/Application\ Support/Code/User/keybindings.json"
You can also open the file n VS Code on mac.
# macOS code "~/Library/Application\ Support/Code/User/keybindings.json"
You can also use gedit
to open the keybindings.json
file from your terminal
on Linux.
# Linux gedit "$HOME/.config/Code/User/keybindings.json"
If you need to completely reset your keyboard shortcuts, leave an empty set of
square brackets []
in the file.
You can also open the file in VS Code.
# Linux code "$HOME/.config/Code/User/keybindings.json"
If you need to Reset VS Code to the default settings or uninstall all extensions as well, click on the following articles:
You can learn more about the related topics by checking out the following tutorials: