New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 613152 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

KeyboardEvent.key value of Super key is "Meta" on Linux

Reported by dtoybo...@gmail.com, May 19 2016

Issue description

UserAgent: 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.
 
Cc: dtapu...@chromium.org chongz@chromium.org
Owner: garykac@chromium.org
Status: Assigned (was: Unconfirmed)
Gary can you clarify the spec here? I thought Chromium's impl is what we wanted.
Cc: w...@chromium.org
Labels: Hotlist-Input-Dev

Comment 3 by dtoybo...@gmail.com, 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

Comment 4 by dtoybo...@gmail.com, 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.

Comment 5 by japhet@chromium.org, May 23 2016

Components: -Blink Blink>Input
Gary can we close this?
@garykac: Ping

Comment 8 by garykac@google.com, 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.

Status: WontFix (was: Assigned)

Sign in to add a comment