Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexdima opened this issue Dec 16, 2021 · 7 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug keyboard-layout Keyboard layout issues web Issues related to running VSCode in the web
Milestone

Comments

@alexdima
Copy link
Member

(extracted from community/community#7683 (reply in thread))

  • on macOS switch keyboard layout to Swedish
  • open vscode.dev in Chrome
  • start typing (the guessed keyboard layout will become German in the status bar)
  • try to use cmd+z
  • observe how the automatic guessing of keyboard layout interferes with cmd+z.
  • I speculate this is caused because on the German keyboard layout Z and Y are swapped, which changes our default keyboard shortcut for undo to be bound to cmd+[KeyY]. (notice the ⌘Y / meta+[KeyZ] confusion printed below):
[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.
@alexdima alexdima added keyboard-layout Keyboard layout issues web Issues related to running VSCode in the web bug Issue identified by VS Code Team member as probable bug labels Dec 16, 2021
@rebornix rebornix added this to the January 2022 milestone Dec 21, 2021
@rebornix rebornix modified the milestones: January 2022, On Deck Jan 27, 2022
@gmoraleslondono
Copy link

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

@dannyskoog
Copy link

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 community/community#7683 (reply in thread)

@gmoraleslondono
Copy link

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
Copy link

@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
Copy link

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

@dannyskoog
Copy link

@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
Copy link

@dannyskoog Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug keyboard-layout Keyboard layout issues web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

5 participants