WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
67757
event.keyCode not correct for onkeypress handler with command and shift modifiers
https://bugs.webkit.org/show_bug.cgi?id=67757
Summary
event.keyCode not correct for onkeypress handler with command and shift modif...
Ceri Morgan
Reported
2011-09-07 20:42:54 PDT
Created
attachment 106695
[details]
Test case that can be used to see event.keyCode for various keypresses When examining the event.keyCode in an onkeypress event handler, the shift key is ignored when the command key is also pressed. For example, here are the keyCode values I get when hitting the following keystrokes: a - 97 shift a - 65 command a - 97 command shift a - 97 For the last keystroke, I would expect to get a keyCode of 65. The modifiers are correctly set on the event object, but due to different keyboard layouts across the world, it's dangerous to assume, for example, that command 7 results in an ampersand.
Attachments
Test case that can be used to see event.keyCode for various keypresses
(506 bytes, text/html)
2011-09-07 20:42 PDT
,
Ceri Morgan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-09-08 10:52:17 PDT
This is what the U.S. keyboard layout has in its Cmd+Shift plane. You can verify this by opening the Keyboard panel (which can be enabled via Mac OS X Keyboard preferences pane). Cmd and Cmd+Shift panes both have lowercase letters. We don't have any information about key presses besides what the OS tell us based on keyboard layout, so there is no practical way for us to change this behavior.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug