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

Starting VSCode with a non-English layout and then switching to English #5152

Closed
jonathanloske opened this issue Apr 11, 2016 · 7 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues verified Verification succeeded
Milestone

Comments

@jonathanloske
Copy link

  • VSCode Version: 0.10.11
  • OS Version: OS X 10.11.4

Steps to Reproduce:

  1. Switch to non-English keyboard layout (in my case German)
  2. Start VSCode
  3. Switch to U.S. keyboard layout
  4. Hit CMD+/
  5. Nothing happens, even though this should comment / uncomment
  6. Switch back to German keyboard layout
  7. Hit CMD+- ('-' (dash) on the German keyboard layout is in the same location as '/' (slash) on the U.S. keyboard layout)
  8. Now you get comment / uncomment

Possibly related issues: #4619, #1549, #1492

@alexdima
Copy link
Member

For performance reasons, we detect the keyboard layout once, when you first press a key. We then cache this information until a restart. AFAIK there is no browser event to know when the keyboard layout has changed, so we would need to poll on the keyboard layout. It is unfortunate.

@whee
Copy link

whee commented Apr 28, 2016

I believe there is more to it. I am using the Dvorak keyboard layout. If the first key combination I press is "Cmd-,", VS Code acts as if I hit 'Cmd-w" -- the QWERTY key. There is no switching of layouts in this case and the only layout configured on my system is Dvorak.

@jonathanloske
Copy link
Author

Yup, pretty much what I found, too. The behavior of VSCode doesn't make much sense in this way. It accepts the wrong key combination if it starts up with the user having set a non-English keyboard layout. Maybe this is also related to me having set English as my system language.

@henriiik
Copy link

I ran into this problem as well, (i use swedish and english keyboard layouts).

Perhaps a solution could be to have a command that you can invoke to clear the cache?

@alexdima
Copy link
Member

Perhaps a solution could be to have a command that you can invoke to clear the cache?
👍

@alexdima alexdima added this to the June 2016 milestone May 23, 2016
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label May 23, 2016
@alexdima alexdima removed this from the June 2016 milestone Jun 30, 2016
@alexdima alexdima added the keybindings VS Code keybinding issues label Mar 1, 2017
@alexdima alexdima added this to the Backlog milestone Mar 1, 2017
@alexdima alexdima added the keyboard-layout Keyboard layout issues label Mar 1, 2017
@alexdima
Copy link
Member

I have validated that we now (i.e. after PR #22894 aka #17521 -- in today'sInsiders build), on OSX, we detect keyboard layout changes and update the keybinding service appropriately. I have tested with these exact steps

@alexdima alexdima modified the milestones: March 2017, Backlog Mar 24, 2017
@chrmarti chrmarti added the verified Verification succeeded label Mar 30, 2017
@mpseidel
Copy link

Having the same issue in Windows. Anything I can do about it?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants