microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.87k stars 29.15k forks source link

Swedish keyboard layout is identified as German and this breaks Cmd+Z to undo #139305

Open alexdima opened 2 years ago

alexdima commented 2 years ago

(extracted from https://github.com/github/feedback/discussions/7683#discussioncomment-1787145)

[2021-12-10 12:11:50.275] [window] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
[2021-12-10 12:11:50.300] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
[2021-12-10 12:11:50.324] [window] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-12-10 12:11:50.667] [window] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: KeyZ, keyCode: 90, key: z
[2021-12-10 12:11:50.690] [window] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyZ, keyCode: 56 ('Z')
[2021-12-10 12:11:50.712] [window] [info] [KeybindingService]: | Resolving meta+[KeyZ]
[2021-12-10 12:11:50.735] [window] [info] [KeybindingService]: \ No keybinding entries.
[2021-12-10 12:11:50.758] [window] [trace] KeybindingService#dispatch ⌘Y undefined
[2021-12-10 12:11:51.164] [window] [info] [KeybindingService]: + Storing single modifier for possible chord meta.
[2021-12-10 12:11:51.465] [window] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
gmoraleslondono commented 11 months ago

Is there a workaround for this? I can't undo/redo in Codespaces. I use a Swedish keyboard. Chrome 119 on macOS 14

dannyskoog commented 11 months ago

Is there a workaround for this? I can't undo/redo in Codespaces.

I use a Swedish keyboard. Chrome 119 on macOS 14

@gmoraleslondono Try this https://github.com/community/community/discussions/7683#discussioncomment-1787145

gmoraleslondono commented 11 months ago

Thank you, It fixed the undo/redo. Unfortunately, nothing else works with the US layout since I am using a Swedish keyboard, for example toggling comment line doesn't work because the keys are in different position lol

In my opinion, this workaround doesn't solve the issue

dannyskoog commented 11 months ago

@gmoraleslondono That sounds suboptimal, I agree 😅 I haven't used the web-based editor that much since this errand was created, so I'm not in any good position to give additional advice unfortunately.

gmoraleslondono commented 11 months ago

Where could one start to properly fix it for the Swedish keyboard layout?

dannyskoog commented 11 months ago

@gmoraleslondono Your best shot is to get some attention from the Microsoft engineers ofc. And since this ticket haven't received that much priority, you might as well create a fresh bug report. That's my recommendation.

gmoraleslondono commented 11 months ago

@dannyskoog Thank you :)