Issue
I'm experiencing a confusing behavior on my laptop. It is a dual-boot W10/Mint20 both are installed in English. The laptop's keyboard is German (CH) but when working at a desk my keyboard is French.
I simply switch the keyboard settings when need be and almost all of the keystrokes are absolutely fine. But some keystroke are registered as part of the other language some time.
Example: I'm coding in Visual Studio Code and the keyboard is set in French, but if I enter the command CTRL+z, it closes the tab. While CTRL-y is undoing the last action. There respective key in German Keyboard would be w and z. So it seems like the keyboard is passing the wrong information. When using the Developer: Toggle Keyboard shortcut trouble shooting If could read the following after entering CTRL-z:
[2021-01-08 17:08:20.229] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
[2021-01-08 17:08:20.229] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched.
[2021-01-08 17:08:21.494] [renderer1] [info] [KeybindingService]: / Received keydown event - modifiers: [ctrl], code: KeyW, keyCode: 90, key: z
[2021-01-08 17:08:21.494] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: KeyW, keyCode: 56 ('Z')
[2021-01-08 17:08:21.494] [renderer1] [info] [KeybindingService]: | Resolving ctrl+[KeyW]
[2021-01-08 17:08:21.494] [renderer1] [info] [KeybindingService]: \ From 3 keybinding entries, matched workbench.action.closeActiveEditor, when: no when condition, source: built-in.
So I understand that in this specific context, typing Ctrl-z is processed as Ctrl-w. While at the same time if I type a *z in my script it appears as such...
This is not the only software behaving this way, ImageJ's shortcuts are also affected (shortcut q becomes shortcut a), but on the opposite Firefox's shortcuts are not (Ctrl-z is indeed Ctrl-Z)...
If anyone as an idea of what to check, I simply have no idea what could be wrong. I've tested an other Fr keyboard with the same trouble.
Solution
I think I finally understood the source of my problem... The keyboard layout can be changed by using the keyboard shortcut, BUT... For some reason it doesn't change entirely the behavior and shortcuts are often messed up. To do this, it seems like manually changing the order in the Keyboard->Layout tab (see pic) and desired one at the top of the list. This fixed my problem for code and ImageJ at least. (I just have to keep in mind that now shortcuts in these softwares are ALWAYS based on a French layout keyboard.
Maybe this will help someone else one day :)
Where can I change these settings!?
Answered By - Sebastien H Answer Checked By - Marie Seifert (WPSolving Admin)