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

impossible to type '{' on french keyboard with OS X #4712

Closed
jbpotonnier opened this issue Mar 28, 2016 · 10 comments
Closed

impossible to type '{' on french keyboard with OS X #4712

jbpotonnier opened this issue Mar 28, 2016 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Milestone

Comments

@jbpotonnier
Copy link

  • VSCode Version: 0.10.11
  • OS Version: OS X 10.11.3

Steps to Reproduce:

  1. type alt-(
  2. Nothing happen

My keyboard is a french azerty (Apple style)

It works in terminal and other editors like Emacs, but I have the same problem with Atom.
I guess it might be related to atom/atom-keymap#35
Without this key, the editor is useless to me.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority l10n-platform Localization platform issues (not wrong translations) labels Mar 28, 2016
@dbaeumer dbaeumer added editor and removed l10n-platform Localization platform issues (not wrong translations) labels Mar 29, 2016
@dbaeumer dbaeumer assigned alexdima and unassigned dbaeumer Mar 29, 2016
@alexdima
Copy link
Member

@jbpotonnier I have just tried on a fresh install of VSCode 0.10.11 on the Mac with the French azerty keyboard layout. Since I have a physical keyboard in English I type Alt+5 and I get a {.

Is it possible that you have installed some extensions that bind alt+5. Does this reproduce if you run VSCode without extensions (the --disable-extensions flag)?

@alexdima alexdima added info-needed Issue requires more information from poster macos Issues with VS Code on MAC/OS X and removed bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels Mar 29, 2016
@jbpotonnier
Copy link
Author

@alexandrudima I don't think I have a special extension. I'll check tonight.
EDIT: I just checked it is still not working, even with the --disable-extensions flag.

@alexdima
Copy link
Member

@jbpotonnier Do you still have this issue?

@jbpotonnier
Copy link
Author

@alexandrudima Yes it is still here.
I'm now using vscode mostly on Linux and sometime with osx, both with dvorak mapping, so I'm not really affected, but the bug is still there.

@alexdima
Copy link
Member

@jbpotonnier

To clear this, I believe you mean AltGr+5 is not working for you (AltGr as in the Alt key to the right of the spacebar). I am also assuming you are on osx with the french azerty keyboard layout.

May I ask you to try the following:

Check what Chrome sends our way

  • Open in Chrome https://www.w3.org/2002/09/tests/keys.html
  • Press AltGr+5
  • Provide a screenshot
  • Here I am doing AltGr+5 on a Windows machine. Windows a slightly different kb layout for French, and AltGr+5 produces [, but the principle is the same:
    image
keydown (0): [keyCode: 17][shift: false][ctrl: true][alt: false][meta: false]
keydown (1): [keyCode: 17][shift: false][ctrl: true][alt: false][meta: false]
keydown (2): [keyCode: 18][shift: false][ctrl: true][alt: true][meta: false]
keydown (3): [keyCode: 18][shift: false][ctrl: true][alt: true][meta: false]
keydown (4): [keyCode: 53][shift: false][ctrl: true][alt: true][meta: false]
keydown (5): [keyCode: 53][shift: false][ctrl: true][alt: true][meta: false]
keypress (6): [keyCode: 91][charCode: 91][character: [][shift: false][ctrl: true][alt: true][meta: false]
keypress (7): [keyCode: 91][charCode: 91][character: [][shift: false][ctrl: true][alt: true][meta: false]
keyup (8): [keyCode: 53][shift: false][ctrl: true][alt: true][meta: false]
keyup (9): [keyCode: 53][shift: false][ctrl: true][alt: true][meta: false]
keyup (10): [keyCode: 17][shift: false][ctrl: false][alt: true][meta: false]
keyup (11): [keyCode: 17][shift: false][ctrl: false][alt: true][meta: false]
keyup (12): [keyCode: 18][shift: false][ctrl: false][alt: false][meta: false]
keyup (13): [keyCode: 18][shift: false][ctrl: false][alt: false][meta: false]

Check what we detect

Note: Please restart or reload window in VSCode after changing keyboard layout and make sure you're on the latest version

  • Go to Preferences > Keyboard Shortcuts
  • Click on the "Define Keybinding"
  • Press AltGr+5
  • We should be detecting it as ctrl+alt+5
    altgr-5

Check who binds this keybinding

  • In the Default Settings on the left, search for "ctrl+alt+5"
  • In the User Settings on the right, search for "ctrl+alt+5"
  • Please let me know if you find a keybinding bound to that key combination

Please remember to do all of the above on OSX, in the French azerty kb layout (so we're talking about the same things :))

Thanks!

@jbpotonnier
Copy link
Author

@alexandrudima
Here is a screenshot of the keyboard events page after pressing altGr + 5 :
keys

Here is another one in vscode, after pressing altGr + 5
shortcuts

With altGr pressed, the keys from 1 to 5 look dead, no event.

@alexdima
Copy link
Member

alexdima commented Oct 31, 2016

@jbpotonnier Given your first screenshot, it looks like this is a Chromium issue. i.e. Chromium gives a keydown and keyup event only for keyCode: 18 (Alt).

In other words, we are not receiving AltGr+5 because Chromium is not giving it to us.

You might have some software installed on your system that eats up these key combinations at the OS level or this might be an issue in Chromium.

Please create an issue on Chromium at https://bugs.chromium.org/p/chromium/issues/list and link to it here. -- you can show the w3c tester unexpected behaviour. You can also do the same in Firefox and let them know if Firefox does the right thing.

@alexdima alexdima added upstream Issue identified as 'upstream' component related (exists outside of VS Code) 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 editor labels Oct 31, 2016
@HookyQR
Copy link
Contributor

HookyQR commented Nov 18, 2016

It's caused by VS Code's attempt to 're-map' the keys codes so the shortcuts map to the QWERTY key positions rather than the characters. Try the hack in #15624 (comment), and if that helps, perhaps comment on the PR #15687.

I can use a French keyboard (just tested it) with the 're-mapping' removed.

@overcyn
Copy link

overcyn commented Dec 16, 2016

@HookyQR That finally fixes the issue for me!

@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's upcoming Insiders build) appear to behave correctly for this keyboard layout

screen shot 2017-03-24 at 11 10 57

I pressed alt+[Digit5] (aka alt+( and I correctly got { typed in the editor.


This makes me believe the fix in PR #22894 aka #17521 resolves this issue.

@alexdima alexdima modified the milestones: March 2017, Backlog Mar 24, 2017
@jrieken jrieken added the verified Verification succeeded label Mar 31, 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
bug Issue identified by VS Code Team member as probable bug keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants