visual-studio-codeconfigurationubuntu-24.04

Where manually configured keyboard shortcut bindings in Visual Studio Code are stored, on Ubuntu 24.04?


from How can I change keyboard shortcut bindings in Visual Studio Code? I know that I can use File -> Preferences -> Keyboard shortcuts to manually configure them.

But for some reason, once changed those are not saved in my config file (which I keep in my dotfiles repository, to avoid manual reconfiguration over and over again).

Where keyboard shortcuts config is stored? (to avoid XY problem: how can I restore it from CLI on new system?)


Solution

  • It is at ~/.config/Code/User/keybindings.json. In the same directory as settings.json.

    You can figure this out by opening the keyboard settings, pressing Open JSON in the top-right corner, and looking at the path of the file that opens.