Bug 139430

Summary: Incorrect event.keyIdentifier value for control keys on Linux
Product: WebKit Reporter: Maxim Baz <webkit.bugzilla>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit.bugzilla
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   

Description Maxim Baz 2014-12-08 23:31:30 PST
Use the following html to reproduce:

<html>
<body onkeydown="alert('event.keyIdentifier = ' + event.keyIdentifier);">
</body>
</html>

Press a control key, for example "Shift".

On Windows (Webkit 537.36), event.keyIdentifier == "Shift".
On Linux (Webkit 537.36), event.keyIdentifier == "U+00A0" (for LShift) or "U+00A1" (for RShift).
On Linux (Webkit nightly 601.1), event.keyIdentifier == "U+0000" for both LShift and RShift.

According to the document below, I believe key identifiers must be textual, i.e. "Shift" in the example above.
So Webkit on Windows behaves properly, but it should be fixed for the Linux platform.

http://www.w3.org/TR/2006/WD-DOM-Level-3-Events-20060413/keyset.html#KeySet-Set-h2