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
It is difficult to deal with keybindings when using non-US standard keyboard layout #713
Comments
Can you use |
Note this might be related to a similar bug in full Visual Studio 2015: |
@74th Here is what I could find -- https://code.google.com/p/chromium/issues/detail?id=428018 |
I test JIS-keyboard in Ubuntu and Windows.
I’ll try to code (1). |
@74th the Regarding using the I think what you really want is a keypress "trap" mode. This would allow to remove many of the I am thinking a vim mode would want to "trap" all keybindings producing text and prevent them from reaching the The approach to catch all keybindings is a smart workaround for now, but it is also non-realistic (i.e. would you add in there a rule for ü and all other possible characters) |
I think there is no need to get all keybindings for my vim extension. |
+1 For example: There are two Pressing More on that: all shorcuts containing "" won't work on a French keyboard where the "" character cannot be typed directly, but can only be triggered with |
Just pushed a new npm module native-keymap and adopted it in VSCode. It doesn't do anything yet for mac, but it already works for windows and linux. It kicks in when rendering keybinding labels: Here is Here is @warpdesign This new rendering (screenshot above) will come out in December and it means "Press |
Thanks to @jrieken the labels are also keyboard layout aware on mac |
so, what's the status of this now? |
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85)
In the UI and in the
keybindings.json
file, VSCode represents OEM key codes using the US standard keyboard:VK_OEM_1
(0xBA) as;
VK_OEM_PLUS
(0xBB) as=
VK_OEM_COMMA
(0xBC) as,
VK_OEM_MINUS
(0xBD) as-
VK_OEM_PERIOD
(0xBE) as.
VK_OEM_2
(0xBF) as/
VK_OEM_3
(0xC0) as `VK_OEM_4
(0xDB) as[
VK_OEM_5
(0xDC) as\
VK_OEM_6
(0xDD) as]
VK_OEM_7
(0xDE) as'
This means when VSCode renders in the UI a keybinding as
Ctrl+/
, it actually meansCtrl+VK_OEM_2
.VK_OEM_2
is physically labeled as/?
and sits next to the right hand sideShift
, butVK_OEM_2
is physically labeled as§°
and sits next to1
.This makes life quite difficult for us who use non-US standard keyboard layouts (I'm using a Swiss German keyboard on my laptop).
The only way to make this experience great for non-US standard keyboards is to be able to read the current set keyboard layout from the OS and then:
In the short term, I would like to ask passionate non US standard keyboard layout developers to create and publish extensions that overwrite the default VSCode keybindings with keyboard layout optimized variants. Such an extension is super easy to author, it would only consist of a
package.json
that contributes keybindingsUpdate 30.11.2015: Electron renders the keybindings correctly in the native menu, now it is a question if it will provide API for the JavaScript side to do so too:
Under German (Switzerland),
Split Editor
gets correctly rendered in the menu asCtrl+ä
:While the JS side renders it incorrectly as
Ctrl+\
:electron/electron#3631 tracks the API request to Electron
The text was updated successfully, but these errors were encountered: