New issue
Advanced search Search tips

Issue 826538 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

chrome.input.ime sends wrong key names for Control and Escape

Project Member Reported by bcmi...@google.com, Mar 27 2018

Issue description

Chrome Version: 64.0.3282.190 (Official Build) (64-bit)
Platform: 10176.76.0 (Official Build) stable-channel panther


What steps will reproduce the problem?
(1) In a Chrome IME extension (such as https://chrome.google.com/webstore/detail/composekey/iijdllfdmhbmlmnbcohgbfagfibpbgba), modify the code to call console.log with incoming events.
(2) Press a Control or Escape key.
(3) Check the 'key' property of the KeyboardEvent passed to the extension.


What is the expected result?
The 'key' property should match the W3C standard: 
'Control' (per https://www.w3.org/TR/uievents-key/#keys-modifier)
'Escape' (per https://www.w3.org/TR/uievents-key/#keys-ui)


What happens instead?
The IME extension receives 'Ctrl' or 'Esc' respectively.
If the IME extension does not handle the event, the browser receives a KeyboardEvent with the correct key property.

I suspect that the problem is related to the special-case code here:
https://codesearch.chromium.org/chromium/src/chrome/browser/ui/input_method/input_method_engine_base.cc?l=48-57&rcl=27d8b648d53863a648991f2e95dfe17ddfa8cd6e
 

Comment 1 by bcmi...@google.com, Apr 10 2018

Summary: chrome.input.ime sends wrong key names for Control and Escape (was: chrome.input.ime sends wrong key codes for Control and Escape)

Comment 2 by bcmi...@google.com, Apr 10 2018

Related: https://crbug.com/826538 covers key names that are not valid alphanumeric strings.
Owner: shuchen@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment