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

JIS (Japanese) Keyboard Layout: Define Keybinding popup window shows wrong key #16157

Closed
ypresto opened this issue Nov 28, 2016 · 8 comments
Closed
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

@ypresto
Copy link
Contributor

ypresto commented Nov 28, 2016

  • VSCode Version: 1.7.2
  • OS Version: macOS Sierra 10.12.1
  • Keyboard layout: JIS (Japanese)

Steps to Reproduce:

  1. Open keybindings.json
  2. Press ⌘K ⌘K
  3. Some of key combinations are shown as wrong key

Example of wrong combinations:

Pressed Expected Actual
@ @ [
Shift+1 ! Shift+1
Shift+: * Shift+'
Shift+Cmd+: Cmd+* Shift+Cmd+;
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Nov 29, 2016
@alexdima alexdima added keyboard-layout Keyboard layout issues keybindings VS Code keybinding issues labels Mar 1, 2017
@alexdima alexdima added this to the Backlog milestone Mar 1, 2017
@alexdima alexdima added the macos Issues with VS Code on MAC/OS X label Mar 13, 2017
@alexdima
Copy link
Member

@ypresto 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).

In trying to reproduce, I have installed the Japanese keyboard layout on OS X and tried with both Hiragana and Katakana, but for me, the Keyboard Viewer always seem to reflect the US keys, and things appear to be working correctly. Can you perhaps explain in greater detail what steps I need to take to get this OS X system in the same state as yours. e.g. of the Keyboard Viewer:

screen shot 2017-03-24 at 12 38 31

@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
@ypresto
Copy link
Contributor Author

ypresto commented Mar 29, 2017

My example of Keyboard Viewer:
image

It reproduces only when I use Japanese IME (even if alphabetical (英字 / eisuu) input is used).
But it does not reproduce when I use U.S. IME.

image

@ypresto
Copy link
Contributor Author

ypresto commented Mar 29, 2017

Using Keyboard Viewer or hardware key does not change result in my env.

@alexdima
Copy link
Member

alexdima commented May 5, 2017

@ypresto Thanks to the help of @landonepps (through PR microsoft/node-native-keymap#8), I believe we now support Japanese IME on JIS keyboards on OSX a lot better.

Sorry for the constant noise, could you please try again using a more recent VS Code version (I think the fix is also in stable 1.12, but best would be if you could check using the Insiders build)

The reason I am asking is because I only have access to ANSI and ISO keyboards, and not to a JIS keyboard, and OSX sometimes has very different behaviours on the same input method if different physical keyboard types are used.

@alexdima alexdima changed the title Define Keybinding popup window shows wrong key JIS (Japanese) Keyboard Layout: Define Keybinding popup window shows wrong key May 5, 2017
@landonepps
Copy link

@alexandrudima That's great news. I'm currently on vacation without a computer now, but I'll check if it works with a hardware keyboard when I get back.

@landonepps
Copy link

landonepps commented May 8, 2017

I just tested all the listed combinations, and I believe this issue can now be closed.

I'm not sure why @ypresto listed the expected value of shift+1 as !. The currently displayed value shift+1 seems right to me.

: displays as [Quote], and @ displays as [BracketLeft]

This is not ideal, but the program does indicate beneath and in a tooltip that for the current keyboard layout the user should press : and @ respectively. I believe the name Quote and BracketLeft come directly from the results of the macOS function TISGetInputSourceProperty used by node-native-keymap. Since these are the values used by the OS, I think it's acceptable to keep them the same, even though they do not match the physical keyboard keys.

screen shot 2017-05-08 at 15 44 45

@alexdima
Copy link
Member

alexdima commented May 8, 2017

Thank you @landonepps

Indeed, when a key is ambiguous (i.e. differs from the US keyboard layout), we generate scan code based keybindings, so this is expected.

@ypresto
Copy link
Contributor Author

ypresto commented May 11, 2017

I tried insider version:

image

Wow! It is working like a charm..!! Thank you for fix!

@alexdima alexdima modified the milestones: Backlog, May 2017 May 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
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

5 participants