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

Issue 601882 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Ctrl+c does not produce correct DomKey on U.S. keyboard

Project Member Reported by chongz@chromium.org, Apr 8 2016

Issue description

Version: 51.0.2703.0 canary
OS: Windows 8

What steps will reproduce the problem?
(1) Open https://cdn.rawgit.com/w3c/uievents/gh-pages/tools/key-event-viewer.html
(2) Press Ctrl+c
(3) Check `keydown` event 

What is the expected output?
'key' should be 'c'

What do you see instead?
'key' is empty

This issue happens for all key combinations that normally produce a control character.

Cause:
'key' of 'keydown' event was overwritten by 'key' from 'keypress' event, see https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/ime/input_method_win.cc&q=set_character&sq=package:chromium&type=cs&l=170
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 12 2016

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

commit 19ec26442db050a055cf9f9486aa69db4bd70cf1
Author: chongz <chongz@chromium.org>
Date: Tue Apr 12 15:26:58 2016

Only overwrite DomKey of keydown event if it's a printable character

InputMethodWin will combine the WM_KEY* and WM_CHAR messages, and will
overwrite DomKey for |keydown| with the DomKey of |keypress|.

We want to only overwite it if the new DomKey is not a control
character.

BUG= 601882 

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

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

[modify] https://crrev.com/19ec26442db050a055cf9f9486aa69db4bd70cf1/ui/base/ime/input_method_win.cc

Comment 2 by chongz@chromium.org, Apr 13 2016

Labels: -M-51 M-52
Status: Fixed (was: Started)

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

Labels: -M-52 Merge-Request-51 M-51
Requesting merge because this issue affects all Ctrl+foo combinations and will make the ship of KeyboardEvent.key incomplete.

Tested on Canary Release.

Entry on the feature dashboard: https://www.chromestatus.com/feature/4748790720364544 

Comment 4 by tin...@google.com, Apr 26 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 27 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ebe05dfa595ef8688ff8f10eac850821ed095de2

commit ebe05dfa595ef8688ff8f10eac850821ed095de2
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Apr 27 16:16:37 2016

Only overwrite DomKey of keydown event if it's a printable character

InputMethodWin will combine the WM_KEY* and WM_CHAR messages, and will
overwrite DomKey for |keydown| with the DomKey of |keypress|.

We want to only overwite it if the new DomKey is not a control
character.

BUG= 601882 

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

Cr-Commit-Position: refs/heads/master@{#386691}
(cherry picked from commit 19ec26442db050a055cf9f9486aa69db4bd70cf1)

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

Cr-Commit-Position: refs/branch-heads/2704@{#266}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/ebe05dfa595ef8688ff8f10eac850821ed095de2/ui/base/ime/input_method_win.cc

Comment 6 by ajha@chromium.org, May 4 2016

Labels: TE-Verified-51.0.2704.36 TE-Verified-M51
Verified the merge on the latest M-51(51.0.2704.36) on Windows-7 and this is Working as intended. Attached is the screenshot of the same.
601882.png
131 KB View Download

Sign in to add a comment