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

Cannot type # with Neo keyboard layout #12393

Closed
flyx opened this issue Sep 21, 2016 · 11 comments
Closed

Cannot type # with Neo keyboard layout #12393

flyx opened this issue Sep 21, 2016 · 11 comments
Assignees
Labels
info-needed Issue requires more information from poster keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues macos Issues with VS Code on MAC/OS X
Milestone

Comments

@flyx
Copy link

flyx commented Sep 21, 2016

  • VSCode Version: 1.5.2
  • OS Version: OSX 10.11.6

Steps to Reproduce:

  1. Install and activate Neo
  2. Try to type a # in any file (option+ü with Neo)

Expected Result

The character # gets inserted at the cursor position.

Actual Result

No character gets inserted at the cursor position.

@chrmarti
Copy link
Contributor

Might that key combination be used by one of the keybindings?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Sep 21, 2016
@chrmarti chrmarti self-assigned this Sep 21, 2016
@flyx
Copy link
Author

flyx commented Sep 21, 2016

I looked through VSCode's menu items, but did not find any item that had that key binding. I know that keybindings of option/alt+something are common on Windows and Linux, but not so much on OSX, since option is used as keyboard modifier to type characters.

I did a quick scan through the system-wide keyboard shortcuts, but did not find anything that maps to option+ü.

@flyx
Copy link
Author

flyx commented Sep 21, 2016

Ah, there is also the keybinding JSON of VSCode. I scanned through that too, but did not find anything.

@chrmarti
Copy link
Contributor

Do other combinations of option+umlaut work?

When you open the keybindings JSON, there is a 'Define Keybindings' button in the lower right of the writeable editor. Could you press that and then type option+ü in the opened text field and let me know what that tells you?

@flyx
Copy link
Author

flyx commented Sep 21, 2016

Other combinations with umlauts work, for example, option+ö yields $ as expected.

Define Keybindings shows alt+z when I press it. This explains what happens, since this is the keybinding for Toggle Word Wrap. Further tests reveal that the actual problem seems to be with umlauts: Every key combination with umlauts shows up as if I pressed the keys in QWERTY layout. All other key combinations show up correctly according to Neo layout. So I can get alt+z by either actually pressing option+z or option+ü.

To further investigate, I switched to standard german QWERTZ layout, and there, the umlauts also generate key shortcuts as if the keys which reside there in standard QWERTY are pressed. So, the issue seems to be that for umlauts, VS Code for some reason interprets the keycode as QWERTY input. But this happens only for keyboard shortcuts - I can write umlauts in the source editor perfectly well.

@chrmarti chrmarti added keybindings VS Code keybinding issues bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Sep 21, 2016
@chrmarti chrmarti assigned alexdima and unassigned chrmarti Sep 21, 2016
@alexdima alexdima added the macos Issues with VS Code on MAC/OS X label Sep 22, 2016
@alexdima
Copy link
Member

alexdima commented Sep 22, 2016

@flyx Can you please try the following:

  • open Preferences > Keybindings
  • click on Define Keybinding (the green thing in the bottom right)
  • press the keybinding that isn't working for you (option+ü with Neo)
  • look at how we receive it from Chromium (the thing shown in the textbox)
  • it might be something like alt+3 or whatever
  • there might be a default keybinding we ship with that captures it.
  • search for that keybinding in the default keybindings
  • remove the default keybinding we ship with by writing the rule { "key": "alt+3" } in your keybindings.json (use whatever we got instead of alt+3 -- I'm just guessing here)
  • let us know how it goes

@flyx
Copy link
Author

flyx commented Sep 22, 2016

@alexandrudima I answered most of these questions already in my previous comment. Define Keybinding recognizes option+ü as alt+z, which is an existing keybinding. As I said, the underlying problem is that shortcuts containing umlauts are misinterpreted as shortcuts containing the key at the umlaut's position in QWERTY layout. This is easily reproducible with the standard german QWERTZ layout.

I will try editing the keybindings later today and I think that it will solve my symptom, but not the problem itself. I suggest that:

  • VS Code does not predefine any keyboard shortcuts containing only the option modifier and some printable-character-key for OSX, because those are used for writing characters.
  • This issue gets propagated to Electron, Chromium or wherever it belongs, since from what you wrote, this is likely where the keyboard shortcut gets misinterpreted.

I will report the result of editing the keybindings later.

@flyx
Copy link
Author

flyx commented Sep 22, 2016

Adding { "key": "alt+z" } to my keybindings.json resolves my issue.

@alexdima alexdima added the keyboard-layout Keyboard layout issues label Mar 1, 2017
@alexdima alexdima added this to the Backlog milestone Mar 2, 2017
@alexdima
Copy link
Member

alexdima commented Mar 24, 2017

@flyx Starting with today's insiders version (i.e. after PR #22894 aka #17521) we have changed how keybinding dispatching works on OSX from using e.keyCode to using e.code (i.e. scan codes).

Can you please download the insider's version and check if we work now correctly (i.e. labels reflect what you press).

@alexdima alexdima added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Mar 24, 2017
@flyx
Copy link
Author

flyx commented Mar 24, 2017

It works correctly with the insider's version.

@alexdima
Copy link
Member

Thank you for following up on this

@alexdima alexdima modified the milestones: March 2017, Backlog Mar 27, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues macos Issues with VS Code on MAC/OS X
Projects
None yet
Development

No branches or pull requests

3 participants