event.key is "Print" while event.code is "PrintScreen" |
|||||||
Issue descriptionhttps://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.
,
Feb 12 2018
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
,
Feb 12 2018
,
Feb 15 2018
,
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
,
Feb 20 2018
,
Feb 22 2018
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...!!
,
Aug 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8981b7ec500b3f476d9bdb825299a2f26bbab3d2 commit 8981b7ec500b3f476d9bdb825299a2f26bbab3d2 Author: Daniel Erat <derat@chromium.org> Date: Wed Aug 08 22:49:47 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-Commit-Position: refs/heads/master@{#581711} [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/ash/accelerators/accelerator_controller_unittest.cc [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/ash/accelerators/accelerator_filter_unittest.cc [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/ash/accelerators/accelerator_interactive_uitest_chromeos.cc [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/ash/accelerators/accelerator_table_unittest.cc [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/ash/public/cpp/accelerators.cc [modify] https://crrev.com/8981b7ec500b3f476d9bdb825299a2f26bbab3d2/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_metadata_unittest.cc
,
Aug 22
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 |
|||||||
Comment 1 by dtapu...@chromium.org
, Jan 26 2017Labels: Hotlist-Input-Dev
Status: Available (was: Untriaged)