Summary: | No key identifier in key events for dead keys | ||
---|---|---|---|
Product: | WebKit | Reporter: | O. Andersen <pub-webkit> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | ap, arv |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
Description
O. Andersen
2009-10-21 16:57:06 PDT
Related: http://lists.w3.org/Archives/Public/www-dom/2009OctDec/0131.html On the Mac platform, making the equivalent of Cocoa NSEvent keyCode available as an attribute for keydown/keyup should be fairly straightforward and would be useful for Dashboard Widgets even if it does not work on other platforms. (A cross-platform solution would be even better, of course.) A partial solution to this has appeared in Safari 5: 1) For non-dead keys, keyIdentifier identifies the corresponding character (as before). 2) For dead keys, keyIdentifier is undefined, but keyCode is now set to the corresponding character on a US keyboard. This makes it easy to identify the key that was pressed (except that the key § on a non-ANSI keyboard has the same keyCode as `). This works well in the context of a Dashboard Widget, where Objective-C code can be used to detect the current keyboard layout, enabling mapping from keys to characters or vice versa. For web applications, however, the current mix of character and key identifiers is not ideal; identifying keys and characters separately for all keys would be better. |