Disable VSCode keybindings when switching keyboards

78 Views Asked by At

I have a lot of custom keybindings when attaching my non-English Windows-Keyboard to my English Mac.

When working directly with the Mac, I have to disable some of the bindings by commenting out a big section in the keybindings.json.

How can I automate this settings switch?

I know that keybindings use a when clause, but I did not find a way to check which keyboard is active or if I am on battery or not, or any other difference in the two setups.

1

There are 1 best solutions below

0
rioV8 On

You can use the extension Extra Context.

You can set (or toggle) a context variable to select a bunch of keybindings.

You can use multi-command to combine several set-on set-off for variables to select a particular keyboard.