RESOLVED FIXED35170
[Gtk] DOM listeners get wrong keycodes for some keys
https://bugs.webkit.org/show_bug.cgi?id=35170
Summary [Gtk] DOM listeners get wrong keycodes for some keys
Grant Gayed
Reported 2010-02-19 13:13:24 PST
- observed with WebKitGTK 1.1.21 - view the html page at the bottom, which just prints key event keyCode values - with NumLock OFF, note that pressing '0' or '.' on the keypad give events with keyCode == 0 -> I think these should be 45 and 46 respectively - press Shift+PrintScreen -> the resulting event's keyCode is 42, but it seems like it should be 44 (comparing with IE and Mozilla) <html> <head> <script language="JavaScript"> function keyhandler(e) { alert(e.type); alert(e.keyCode); } function init() { document.onkeydown = keyhandler; document.onkeypress = keyhandler; document.onkeyup = keyhandler; } </script> </head> <body onLoad="init()"> <textarea rows="2" cols="20"> </textarea> </body> </html>
Attachments
Patch for this issue (14.10 KB, patch)
2010-07-30 12:16 PDT, Martin Robinson
no flags
Alexey Proskuryakov
Comment 1 2010-03-28 13:31:55 PDT
Yes, 42 is VK_PRINT, and 44 is VK_SNAPSHOT, which is documented to be PRINT SCREEN.
Martin Robinson
Comment 2 2010-07-30 12:16:43 PDT
Created attachment 63092 [details] Patch for this issue
Xan Lopez
Comment 3 2010-08-01 11:40:00 PDT
Comment on attachment 63092 [details] Patch for this issue Looks good to me.
Martin Robinson
Comment 4 2010-08-02 10:07:42 PDT
Comment on attachment 63092 [details] Patch for this issue Clearing flags on attachment: 63092 Committed r64470: <http://trac.webkit.org/changeset/64470>
Martin Robinson
Comment 5 2010-08-02 10:07:47 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 6 2010-08-02 10:27:42 PDT
http://trac.webkit.org/changeset/64470 might have broken Qt Linux Release
Martin Robinson
Comment 8 2010-08-03 08:56:24 PDT
Thanks for the heads up. I've fixed the expected results and posted a patch for this issue here: https://bugs.webkit.org/show_bug.cgi?id=43422
Note You need to log in before you can comment on or make changes to this bug.