Re: [w3c/uievents] Add specification for AltGraph key & modifier behaviour (#147)

I think that ideally, when AltGraph is pressed on Windows, neither Ctrl nor Alt should not be exposed because the modifier's meaning has been changed.

If AltGr + KeyA is pressed, following events are fired (perhaps):

1. LeftCtrl or RightCtrl is down
2. LeftAlt or RightAlt is down
3. KeyA is down and up
4. LeftCtrl or RightCtrl is up
5. LeftAlt or RightAlt is up

(1 and 2, 4 and 5 may be swapped)

Then, events at 1 cannot be exposed as AltGr since only one modifier is active at this time. 5 is similar to it. Next, 2, 3 and 4 can be AltGr. However, I have no idea how to distinguish if the keyboard layout has AltGr function.

On the other hand, there is a possible issue. For example, if the events are fired with following order:

1. CtrlLeft keydown
2. AltRight keydown
3. CtrlLeft keyup
4. AltRight keyup

If 2 and 3 don't have raw modifier information, i.e., "Alt" nor "Ctrl", web apps may failed to manage modifier state. E.g., if a web app entering special mode only while Ctrl key is pressed, pressing both Alt and Ctrl keys may cause locking it into the mode if 3 is treated as "AltGr" keyup event.

However, I have no idea of problem if browsers remove Ctrl and Alt modifier state from the events between 2 and 4 in the first example.

FYI: In Japan, most users never use AltGr key. Therefore, some compact keyboards don't have AltRight key (and also MetaRight). So, I sometimes need to use both CtrlLeft and AltLeft to test some Western keyboard layouts.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/147#issuecomment-312179079

Received on Friday, 30 June 2017 05:33:27 UTC