Found verifying #1549
Steps to Reproduce on Linux under Parallels with a US keyboard (did not reproduce on Mac):
It seems like the layout switch doesn't clear out the old binding.
Yes, keyboard layout changes are not detected on Linux. The workaround is to restart vscode. This method needs to be implemented: https://github.com/Microsoft/node-native-keymap/blob/master/src/keyboard_x.cc#L235
restarting VS code dos not make it loar right keybord for shortkut
@nicolaslussier Have you tried the workaround suggested at https://github.com/Microsoft/vscode/issues/24166#issuecomment-294002885
I'm having trouble with this, especially because I open VS Code with the French keyboard layout enabled (my OS default), then I switch to US for coding. The Ctrl+Z and Ctrl+W bindings stay on the French keyboard layout which is super frustrating... I haven't found a workaround that helps for now.
@Spone You can reload VS Code F1 > Developer: Reload Window
Yes, but doing so every time I launch VS Code? :rofl:
More possible workarounds:
code with a script where you change the keyboard layout right before launching via setxkbmap(or)
keybindings.json for those keys that annoy you:{ "key": "cmd+[KeyZ]", "command": "undo", "when": "textInputFocus && !editorReadonly" },
Oh, great! The second workaround did the job! Thanks a lot @alexandrudima that was the main pain point while adopting VS Code :)
Coming from #88269 .
If it matters, my keyboard layout is set via localectl set-x11-keymap and thus should be correct when X is starting.
X starts my WM, my WM starts VSCode, shouldn't it work?
Thanks
I am switching frequently between EN and FR keyboard. This bug makes VSCode barely usable for me on Ubuntu 18.04.
I am using EN and FR keyboards on Ubuntu 18.04. I made a custom alias for the command : setxkbmap fr that I use when I'm switching keyboard. It works for me.
Thank you @alexdima
Exact same issue, cannot find a way to fix.
@alexdima you mention
use keyboard layout independent keybindings (code based). e.g. use the following format in your keybindings.json for those keys that annoy you:
{ "key": "cmd+[KeyZ]", "command": "undo", "when": "textInputFocus && !editorReadonly" },
Since this is not how the default keybindings are defined, I assume that there are drawbacks to this method, can you tell what they are (or why the default keybindings don't use this ? )
thanks
Most helpful comment
I am switching frequently between EN and FR keyboard. This bug makes VSCode barely usable for me on Ubuntu 18.04.