Open rniwa opened 6 years ago
There's a similar issue with NumLock
, where initKeyboardEvent
doesn't allow for it to be specified.
And ScrollLock
(which doesn't seem to be supported), Symbol
and SymbolLock
(I can't test the latter two). Those are the only other relevant modifier keys.
Because of this, there is currently no way to affect the result of getModifierState()
for constructed events to include these modifiers.
Test page: https://w3c.github.io/uievents/tools/key-event-viewer.html
Firefox & Chrome seem to clear caps lock state. We're going to match their behavior going forward: https://webkit.org/b/188909.
The definition of
initKeyboardEvent
doesn't make it clear whetherAltGraph
key state andCapsLock
key state should be reset or not because it's missing those arguments.Note that WebKit takes
altGraphKey
modifier as an optional boolean argument aftermetaKey
modifier boolean.