[UI Events-key][UI Events-code] Windows logo key on Windows and Linux should be treated as `Meta` key and change `OSLeft`/`OSRight` code values to `MetaLeft`/`MetaRight`
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
People
(Reporter: masayuki, Assigned: masayuki)
References
()
Details
(Keywords: dev-doc-complete, parity-chrome, parity-edge)
Attachments
(1 file)
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Updated•9 years ago
|
![]() |
||
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 4•7 years ago
|
||
Comment 5•6 years ago
|
||
We would very much like to avoid "Meta" being used for two different keys to keep things sane in noVNC. For us it would work fine to say "Alt" even if the system is reporting XK_Meta_*.
For reference, but report with Chrome about them using the same name for two different keys:
https://bugs.chromium.org/p/chromium/issues/detail?id=1020141
Assignee | ||
Comment 7•5 years ago
|
||
Resetting assignee which I don't work on in this several months.
In comment 1 above, it is noted that this bug is on hold until Chromium 613152 is resolved, which happened in 2017. If I'm reading that right, Chromium now interprets the Windows key as Meta. Chromium 539979 removed support for event.getModifierState("OS")
given the conclusions in w3c/uievents-key#9.
The MDN docs for getModifierState § Modifier keys on Gecko say that on Linux (GTK), the Super key and Hyper key both trigger "OS" (but this is later marked as deprecated in § Browser compatibility). That table also has rows for "Super" and "Hyper" that are marked as "Not supported" for all platforms.
This should hopefully clear the way for this bug to get resolved, that we can treat the Windows/Super/OS key as Meta.
I personally dislike the idea of changing modifier key identity based on Shift (Shift
+Alt
= Meta, Shift
+OS
= Hyper). As one of those oddball power tweakers who have actually mapped Hyper to a key on their keyboards, I'd love to see "Hyper" (and a event.hyperKey
method) implemented as well (I understand that this is better proposed to a standards body). This would enable a straightforward (Shift-free) way to handle Meta and Hyper while still allowing a web developer to code their own polyfill to implement the older Shift
+Alt
= Meta and Shift
+Meta
= Hyper logic.
Update: I see w3c/uievents-key#29 notes the code spec has pushed the Super and Hyper keys to legacy status: "These keys are not found on modern standard keyboards." I've always considered Super and Windows to be synonymous, at least from a Linux perspective, and the whole "Meta" term is confusing due to Linux traditionally using Meta to refer to Alt (at least, that's my recollection; the idea of Shift
+Alt
= Meta is not ringing any bells, and I'm a >20y Linux veteran). I still don't see any harm in implementing "Hyper" as its own modifier, but event.hyperKey
is probably unnecessarily confusing.
Updated•3 years ago
|
Please note that with the following PR on GitHub the MDN documentation has been updated to refer to MetaLeft
and MetaRight
: https://github.com/mdn/content/issues/27459
Is it intentional that so far no-one mentioned MacOS, which is also affected?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
Intent to change: https://groups.google.com/a/mozilla.org/g/dev-platform/c/S859KrLKSBU
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
In strictly speaking, OSLeft
/OSRight
-> MetaLeft
/MetaRight
should be handled in another bug, but the related tests are same ones. Therefore, I'd like to change them with .key
value changes.
Assignee | ||
Comment 12•2 years ago
|
||
When we implement KeyboardEvent.key
, its value for Windows Logo key was
declared as OS
, but now the spec declares it as Meta
.
https://www.w3.org/TR/uievents-key/#key-Meta
When we implement KeyboardEvent.code
, its value for Windows Logo keys in
Win/Linux and Command keys in macOS are declared as OSLeft
/OSRight
, but
now the spec declares them as MetaLeft
/MetaRight
.
https://w3c.github.io/uievents-code/#code-MetaLeft
This patch remaps and renames them.
Depends on D183480
Assignee | ||
Comment 13•2 years ago
|
||
The patch will be landed after the next merge (i.e., will be fixed in 118).
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
Backed out for causing mochitest failures in test_autoplay_policy_key_blacklist.html
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/media/autoplay/test/mochitest/test_autoplay_policy_key_blacklist.html | Caught exception [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsITextInputProcessor.keydown]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://testing-common/WrapPrivileged.sys.mjs :: doApply :: line 117" data: no] Component returned failure code: 0x80070057 (NS_ERROR_ILL
Assignee | ||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
bugherder |
Comment 18•2 years ago
|
||
FF118 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/28844
Description
•