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

Issue 683097 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

event.key is "Print" while event.code is "PrintScreen"

Project Member Reported by foolip@chromium.org, Jan 20 2017

Issue description

https://jsfiddle.net/w8pmbgtn/1/ is a demo printing the event.code/key/charCode/keyCode. Found while working on  issue 668969 , if testing before that has been fixed press any other key first to get the PrintScreen keyup event.

Pressing PrintScreen in this example in Firefox, both event.code and event.key are "PrintScreen". In Chrome 57.0.2986.0, however, event.key is "Print". Note that the keyCode is the same, 42.

Either Firefox or Chrome should change here, and it seems likely that Chrome's behavior is a bug.
 
Cc: chongz@chromium.org dtapu...@chromium.org
Labels: Hotlist-Input-Dev
Status: Available (was: Untriaged)
Yup can definitely reproduce this.
Project Member

Comment 2 by sheriffbot@chromium.org, Feb 12 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by foolip@chromium.org, Feb 12 2018

Labels: -Hotlist-Recharge-Cold
Owner: dtapu...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 17 2018

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

commit 7ab3497a39e00cc08b3f0901f272160ea3b2a46d
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Sat Feb 17 02:33:09 2018

Fix PrintScreen key on Linux.

Despite the name, Linux/X11 systems map the PrintScreen
key to XK_Print rather than XK_KEY_3270_PrintScreen.
We map both to DOM 'PrintScreen' to match user expectations, and
the behaviour of other browsers, and Chrome on other platforms.

BUG= 683097 

Change-Id: If2d4f78ef191d51544f0eee64098a7348e60fa37
Reviewed-on: https://chromium-review.googlesource.com/921921
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537512}
[modify] https://crrev.com/7ab3497a39e00cc08b3f0901f272160ea3b2a46d/ui/events/keycodes/keyboard_code_conversion_xkb.cc

Status: Fixed (was: Assigned)
Labels: TE-Verified-M66 TE-Verified-66.0.3352.0
Able to reproduce the issue on Ubuntu 14.04 using chrome version #57.0.2986.0 as per comment#1.

Verified the fix on Ubuntu 14.04 using latest chrome version #66.0.3352.0 as per comment #0.
Attaching screen cast for reference.
Observed that pressing PrintScreen after navigating to https://jsfiddle.net/w8pmbgtn/1/ yielded both event.code and event.key as "PrintScreen".
Hence, the fix is working as expected. 
Adding the verified labels.

Thanks...!!
683097.ogv
1.4 MB View Download
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 8

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 22

Labels: merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/28a02e31831bdf632b495852278ac2880fa510b9

commit 28a02e31831bdf632b495852278ac2880fa510b9
Author: Daniel Erat <derat@chromium.org>
Date: Wed Aug 22 21:08:45 2018

chromeos: Fix "Print Screen" screenshot accelerator.

Make ash map VKEY_SNAPSHOT to the TAKE_SCREENSHOT action.
7ab3497a updated Chrome to map the "Print Screen" key to
VKEY_SNAPSHOT rather than VKEY_PRINT.

Bug:  683097 ,  846919 ,  872094 
Change-Id: I3e8de9e8b2d110d8e06649fc0553c6d9b7cab35a
Reviewed-on: https://chromium-review.googlesource.com/1166037
Commit-Queue: Dan Erat <derat@chromium.org>
Reviewed-by: Kevin Schoedel <kpschoedel@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#581711}(cherry picked from commit 8981b7ec500b3f476d9bdb825299a2f26bbab3d2)
Reviewed-on: https://chromium-review.googlesource.com/1185502
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#779}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/ash/accelerators/accelerator_controller_unittest.cc
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/ash/accelerators/accelerator_filter_unittest.cc
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/ash/accelerators/accelerator_table_unittest.cc
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/ash/public/cpp/accelerators.cc
[modify] https://crrev.com/28a02e31831bdf632b495852278ac2880fa510b9/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc

Sign in to add a comment