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

Shortcuts with Italian key layout work randomly #18949

Closed
ehteqx opened this issue Jan 20, 2017 · 4 comments
Closed

Shortcuts with Italian key layout work randomly #18949

ehteqx opened this issue Jan 20, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug keybindings VS Code keybinding issues keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux verified Verification succeeded
Milestone

Comments

@ehteqx
Copy link

ehteqx commented Jan 20, 2017

  • VSCode Version: 1.8.1
  • OS Version: Ubuntu 14.04 LTS (Dell Custom)
  • System language: English US
  • Keyboard: Standard Italian

Steps to Reproduce:

  1. Set keyboard layout (thorugh Ubuntu) to Italian - this is the standard setup of mine, since keyboard layout is Italian.

  2. Go to File -> Preferences -> Keyboard shortcuts, and look for i.e. "Toggle new terminal" (that is Ctrl+` for US layout and Crtl+\ for Italian layout - they are on the same physical key, so I assume this is the rationale).

  3. Execute the shortcut and (a) nothing happens or worse (b) something different from expected happens.

  4. Set keyboard layout (thorugh Ubuntu) EN-US (it might work, sure, but it takes a bit, making it useless to use shortcuts)

  5. The command works, if the Italian-keyboard key combination is pressed.

To my knowledge and limited testing, this is the only way to make some shortcuts work.

@ehteqx
Copy link
Author

ehteqx commented Jan 21, 2017

I will add now - after some deeper testing - new information that may help solving (or better, identifying...) the issue. I entered in File -> Preferences -> Keyboard shortcuts, as if I needed to define a new custom shortcut in order to check how VSC rendered characters and keys. This is what I found.

UBUNTU SET TO ITALIAN LAYOUT

  • Keys pressed: Ctrl+Shift+\ (it IT keyboard, corresponding to Ctrl+Shift+` in US one)
  • Characters shown in the textbox: Ctrl+Shift+\
  • Characters shown as rectangular key images: Ctrl+Shift+ù (ù is in the same place as \ on US keyboard)

UBUNTU SET TO US LAYOUT

  • Keys pressed: Ctrl+Shift+\ (it IT keyboard, corresponding to Ctrl+Shift+` in US one)
  • Characters shown in the textbox: Ctrl+Shift+`
  • Characters shown as rectangular key images: Ctrl+Shift+\ (\ is in the same place as ` on US keyboard)

However, changing layout and then rebooting VSC does not trigger any change in the overlay which says "With current keyboard layout: ..." over default keybindings.

To conclude, with keyboard layout set to Italian (if it can help), pressing Ctrl+Shift+ù does nothing, exactly as Ctrl+Shift+. With layout set to US, it works if following Italian suggestions, that is pressing the key on the keyboard with the Italian symbol as suggested.

To me, it seems that VSC suggests as language-specific shortcuts the shortcuts one had to press if the keyboard for that language is used with US layout. And that way it works just fine (what's difficult that way is the act of writing itself).
If a different layout is selected, something unexpected happens, and I am not able to figure out what.

Thank you (the editor itself is great, though!) and sorry for the long follow-up.

@alexdima alexdima added the keybindings VS Code keybinding issues label Jan 21, 2017
@alexdima
Copy link
Member

Related: #17521

@alexdima alexdima added this to the Backlog milestone Jan 21, 2017
@ehteqx
Copy link
Author

ehteqx commented Jan 22, 2017

Thanks for your interest for the issue. I am happy, at least, that the problem is known... And I can confirm that #17521 is the case, because with the same machine and same settings under Windows 10 VSC works perfectly.

Thanks for the support and keep it going, because the editor rocks!

@alexdima alexdima added the keyboard-layout Keyboard layout issues label Mar 1, 2017
@alexdima alexdima added the linux Issues with VS Code on Linux label Mar 13, 2017
@alexdima
Copy link
Member

I have validated that we now (i.e. after PR #22894 aka #17521 -- in tomorrow's Insiders build) appear to behave correctly for this keyboard layout

image


Analysis of default keybinding for workbench.action.terminal.toggleTerminal

  • workbench.action.terminal.toggleTerminal is bound by default to the key code binding ctrl+`
  • ` can be produced through two scan code combinations: Ctrl+Alt+[Minus] and Ctrl+Alt+[Backslash]. i.e.:
    image
  • because Ctrl must be used to produce the visual character, the key code binding ctrl+` is not mappable . i.e. the scan code combo would need to be something like Ctrl+ Ctrl+Alt+Minus, which we don't support.
  • therefore, the action is unbound by default. That is unfortunate, but correct.
  • we don't ship with keyboard layout specific default keybindings, that is something you can upvote in Support contributing different keybindings based on keyboard layout #1240

Analysis of pressing Ctrl+[Backquote]

image

We now correctly label it:
image


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

@alexdima alexdima modified the milestones: March 2017, Backlog Mar 23, 2017
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Mar 23, 2017
@roblourens roblourens 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 linux Issues with VS Code on Linux verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants