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

Issue 681363 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Windows generates events with |key| set to "Alt" rather than "AltGraph" under AltGr layouts

Project Member Reported by w...@chromium.org, Jan 15 2017

Issue description

Chrome Version: 57.0.2951.0 dev
OS: Windows

What steps will reproduce the problem?
(1) Load a page that displays DOM KeyboardEvent fields.
(2) Set a keyboard layout that treats right-Alt as AltGr.
(3) Press and release the AltGr key.

What is the expected result?

Expect that the keydown/keyup events for the Alt key are reported with |key| set to "AltGraph".

What happens instead?

Chrome generates keydown/keyup events with |key| set to "Alt".

This is complicated by the fact that Windows expresses AltGraph as Ctrl+Alt, so we actually receive keydown and keyup events for both Control and Alt.
 

Comment 1 by w...@chromium.org, Jan 18 2017

Owner: w...@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 18 2017

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

commit 22d68c2c24b7c8a4d65802d2b385d09d50e575c9
Author: wez <wez@chromium.org>
Date: Wed Jan 18 22:34:15 2017

Return AltGraph for right-Alt keydown/keyup, under layouts which use AltGraph.

W3C UI Events defines the "AltGraph" value for KeyboardEvent.key, to express the meaning of the right-Alt key (i.e. KeyboardEvent.code=AltRight) under layouts which use ISO Level 3 Shift to generate some characters (e.g. en-UK, fr-FR, etc).

This patch fixes Chrome to generate AltGraph under such layouts, where previously it would have generated events with key=Alt.

BUG= 681363 

Review-Url: https://codereview.chromium.org/2630213003
Cr-Commit-Position: refs/heads/master@{#444516}

[modify] https://crrev.com/22d68c2c24b7c8a4d65802d2b385d09d50e575c9/ui/events/keycodes/platform_key_map_win.cc
[modify] https://crrev.com/22d68c2c24b7c8a4d65802d2b385d09d50e575c9/ui/events/keycodes/platform_key_map_win.h
[modify] https://crrev.com/22d68c2c24b7c8a4d65802d2b385d09d50e575c9/ui/events/keycodes/platform_key_map_win_unittest.cc

Comment 3 by w...@chromium.org, Jan 19 2017

Status: Fixed (was: Started)

Sign in to add a comment