KeyboardEvent.key value of Super key is "Meta" on Linux
Reported by
dtoybo...@gmail.com,
May 19 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2739.0 Safari/537.36 Example URL: https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html Steps to reproduce the problem: 1. Load https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html 2. Type Super key (typically, default mapping of Windows-Logo key on Linux) What is the expected behavior? The key value should be "Super" as defined in the spec. Although, this key is defined as "Meta" on Windows and Mac. What went wrong? Shift+Alt is typically mapped to "Meta". Therefore, pressing Shift+Alt in the above page, I can also see "Meta" key value. So, it doesn't make sense to map Super key to "Meta", anyway. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? Yes Chrome version: 52.0.2739.0 Channel: canary OS Version: Flash Version: Shockwave Flash 22.0 r0 Note that Firefox still uses "OS" but if Chromium staff don't have any objection to the current spec, we'll change Firefox's behavior too.
,
May 20 2016
,
May 20 2016
Random thoughts: * If browsers use "Meta" for 'Super' key: - How about the key value of 'Hyper' key? - How about the key value of 'Meta' key? * If browsers use "Super" for 'Super' key and "Hyper" for 'Hyper' key: - This is the simplest approach of exposing full feature of X11. - However, this may make incompatibility between browsers on other platforms. The cause of this complicated issue is, Linux users can map 'CapsLock', 'Shift', 'Control', 'Alt', 'Meta', 'Super' and 'Hyper' keysyms into 5 modifier flags. IIRC, at least 10 yeas ago, usual default settings are: 'CapsLock': CapsLock key 'Shift': Shift key 'Control': Control key 'Alt': Alt key without Shift modifier state 'Meta': Alt key with Shift modifier state 'Super': Windows-logo key without Shift modifier state 'Hyper': Windows-logo key with Shift modifier state However, in these days, 'Hyper' isn't mapped. Shift+Super is also mapped to 'Super'. So, 'Hyper' is not used usually. And I found this page during writing this comment: http://askubuntu.com/questions/19558/what-are-the-meta-super-and-hyper-keys
,
May 20 2016
Anyway, even if we map "Meta" to 'Super', Mac and Win/Linux is really different key. For Mac, it (command key) is an accel key for standard shortcut keys. But for the others, it is a sysem accel key which shouldn't be used by application basically.
,
May 23 2016
,
Jun 1 2017
Gary can we close this?
,
Dec 7 2017
@garykac: Ping
,
Dec 7 2017
Yes, we settled on "Meta" as being the most-compatible, least-surprising value to use here. Also note that "Meta" is the value returned for this key in the Legacy 'keyCode' attribute on both Chrome and Firefox, so it's probably the expected value for most web code.
,
Dec 7 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, May 20 2016Owner: garykac@chromium.org
Status: Assigned (was: Unconfirmed)