New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601964 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Japanese composition keys don't generate correct events or |code|s

Project Member Reported by garykac@chromium.org, Apr 9 2016

Issue description

Steps to reproduce:

Setup: Mac with with 106 Japanese keyboard (external USB keyboard).

(1) Go to Keyboard Event Test page: https://cdn.rawgit.com/w3c/uievents/gh-pages/tools/key-event-viewer.html
(2) Type the following keys:
* Key to left of Spacebar (NonConvert)
* The 2 keys to the right of the Spacebar (Convert and KanaMode).


What is the expected output?
Foreach key:
1 Keydown and 1 keyup event with correct |code| values.


What do you see instead?
2 keydown events and no keyup event. None of the events have the |code| value set.

Note:
* Same behavior observed regardless of whether keyboard is setup as ISO, ANSI or JIS.
* On linux, the keyboard events (with |code|s) are generated correctly.
* On Mac Firefox 45.0.1, pressing these keys generates *no* keyboard events.

 
Components: UI>Input>Text UI>Input>Text>IME
Tagging UI>Input>Text and UI>Input>Text>IME for triage by UI.
Cc: shuchen@chromium.org tapted@chromium.org

Comment 3 by rsesek@chromium.org, Apr 22 2016

Components: Blink
Components: -Blink Blink>Input
Labels: -Pri-2 Pri-3
Owner: chongz@chromium.org
Status: Assigned (was: Untriaged)

Comment 6 by chongz@chromium.org, Apr 25 2016

Components: IO>Keyboard
Tested on OS X 10.11.4 with a JIS PC keyboard, all these three keys (NonConvert, Convert and KanaMode) will generate NSEvent with "type:NSFlagsChanged keyCode:255 modifierFlags:256(default flag)", so there is no way to identify them.

Also I cannot find these keys on Apple's JIS keyboard (http://www.apple.com/jp/shop/product/MB110J/B/apple-keyboard-%E3%83%86%E3%83%B3%E3%82%AD%E3%83%BC%E4%BB%98%E3%81%8D-jis), maybe they are not supported by OS X?

I think it makes sense to match Firefox's behavior since there is no useful information in these key events.
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bac970b73d720af26ca715c1e001703217e2cfa3

commit bac970b73d720af26ca715c1e001703217e2cfa3
Author: chongz <chongz@chromium.org>
Date: Tue Apr 26 21:00:54 2016

[Mac] Pressing unsupported key should not generate keyevents

On Mac with an external JIS PC keyboard, pressing "Convert",
"NonConvert" and "KanaMode" keys will always produce |NSFlagsChanged|
NSEvent with |keycode| == 255. Which will then cause blink to fire two
"keydown" events.

These three keys do not exist in Apple's Japanese keyboard, and there
is no way for us to distinguish them or get any useful information (and it requires hack to mock "keydown"/"keyup").

Safari generates two "keydown"s (with no useful information).
Firefox does not generate keyevents for these keys, this CL matches Firefox's bahavior.

BUG= 601964 

Review URL: https://codereview.chromium.org/1923023002

Cr-Commit-Position: refs/heads/master@{#389878}

[modify] https://crrev.com/bac970b73d720af26ca715c1e001703217e2cfa3/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/bac970b73d720af26ca715c1e001703217e2cfa3/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Comment 8 by chongz@chromium.org, Apr 26 2016

Labels: Hotlist-Input-Dev
Status: Fixed (was: Assigned)

Comment 9 by chongz@chromium.org, Apr 26 2016

Labels: M-52

Sign in to add a comment