Intent to Ship: Fixes to modifier flags on AltGraph-shifted keydown/keypress/keyup events.

16 views
Skip to first unread message

Wez

unread,
Feb 5, 2018, 5:19:41 PM2/5/18
to chromi...@chromium.org, Dave Tapuska, gar...@chromium.org

Contact emails

inpu...@chromium.org | w...@chromium.org


Spec & Bugs

At present the expected behaviour of AltGraph on Windows is not well specified (see Summary).


Chromium user-reported bug that illustrates the issues this causes:

https://bugs.chromium.org/p/chromium/issues/detail?id=25503


DOM UI Events bug tracking improvements to the specification of AltGraph behaviour:

https://github.com/w3c/uievents/issues/147


Summary

Under Windows the right-hand Alt key serves as AltGraph (aka ISO-Level-3-Shift) under some layouts (e.g. many European language layouts), to allow an additional set of printable-characters to be generated.


Internally Windows implements AltGraph as Control+Alt.

DOM UI Events does not currently specify/clarify how this implementation detail should be handled by user agents.

At present, Chrome faithfully translates the Windows Control and Alt modifier bits to their DOM counterparts in input event flags, and if both are set then it additionally sets the AltGraph modifier flag. This leads to confusion when handling AltGraph-shifted keyboard input.


We propose to enable the following new behaviour:

  • If the right-hand Alt key is pressed, then under AltGraph layouts, set the AltGraph modifer.

  • If Control+Alt are set on a key event that generates a printable character, set AltGraph.

  • When AltGraph is set, clear the Control and Alt modifier flags.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes - This is a fix to the AltGraph modifier under Windows, to better match other platforms.


Demo link

https://w3c.github.io/uievents/tools/key-event-viewer.html

includes a getModifierState() column under which AltGraph will be listed, if set on an event.


Risks

Interoperability and Compatibility

We believe the main risk is user expectations of sites which make use of Control+Alt modified key sequences as shortcuts. Users with AltGraph keyboard layouts configured may then believe that the sequence is triggered by the AltGraph key (since that used to set Control+Alt as well as AltGraph). Users will be able to reach those sequences by pressing left-Alt plus either Control key, instead.


Compatibility should generally be improved, since we are making Control/Alt/AltGraph modifiers easier for sites to distinguish under Windows, by making the behaviour consistent with Chrome on other platforms.


Edge: No signals

Firefox:Public support

Safari: N/A

Web developers: No signals


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

This change is a platform-specific implementation detail of Chrome’s input pipeline, sitting below the level at which web-platform tests can typically drive the browser. We do not believe that web-platform tests are feasible in this case.


Entry on the feature dashboard:

https://www.chromestatus.com/feature/5059438092222464


Rick Byers

unread,
Feb 6, 2018, 9:23:31 PM2/6/18
to Wez, Chromium-dev, Dave Tapuska, Gary Kacmarcik (Кошмарчик), Patrick Kettner
So this would be changing from matching Edge's behavior in this regard to doing something different?  That seems like something to at least get Microsoft input on.  +patket@ (input/interop PM) who may be able to comment.

Do you have a link to the public support from Firefox?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALekkJcQVuOAAXRe%3DNEj5OeHmeKXR8ckF0zUWFzZK0%3D_AyxHEA%40mail.gmail.com.

Wez

unread,
Feb 7, 2018, 3:05:54 PM2/7/18
to Rick Byers, Chromium-dev, Dave Tapuska, Gary Kacmarcik (Кошмарчик), Patrick Kettner
On 6 February 2018 at 18:21, Rick Byers <rby...@chromium.org> wrote:
So this would be changing from matching Edge's behavior in this regard to doing something different?  That seems like something to at least get Microsoft input on.  +patket@ (input/interop PM) who may be able to comment.

Yes, that is correct, though it's also changing from differing from Chrome on other platforms to matching them.  Look forward to input from patket@ though. :)

Do you have a link to the public support from Firefox?

Masayuki from Mozilla has responded on the UI Events specification bug 

https://github.com/w3c/uievents/issues/147

PhistucK

unread,
Feb 7, 2018, 4:32:11 PM2/7/18
to Wez, Rick Byers, Chromium-dev, Dave Tapuska, Gary Kacmarcik (Кошмарчик), Patrick Kettner
Any reason why this is not (cross-?)posted to blink-dev? I am not sure intents are tracked if they are not posted there...


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALekkJfip8wtTCn8dey0JxVej_jLvgLXK4U-XybNYPOaohMRpA%40mail.gmail.com.

Wez

unread,
Feb 7, 2018, 5:25:38 PM2/7/18
to PhistucK, blin...@chromium.org, Rick Byers, Dave Tapuska, Gary Kacmarcik (Кошмарчик), Patrick Kettner
No _good_ reason, no.  Just cluelessness on my part.  :-/

+blind-dev and bcc:chromium-dev@
Reply all
Reply to author
Forward
0 new messages