As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 448434 - Some shifted keys return an incorrect keycode
: Some shifted keys return an incorrect keycode
Status: RESOLVED FIXED
[fixed by bug 677252]
:
Product: Core
Classification: Components
Component: Widget: Cocoa (show other bugs)
: Trunk
: PowerPC Mac OS X
: P3 minor with 3 votes (vote)
: mozilla15
Assigned To: Masayuki Nakano [:masayuki]
:
: Markus Stange [:mstange]
Mentors:
https://bugzilla.mozilla.org/attachme...
Depends on: 44259 677252
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 13:38 PDT by Greg K.
Modified: 2013-10-11 05:19 PDT (History)
10 users (show)
jaas: wanted1.9.1+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
A completely untested path for this bug. (1.59 KB, patch)
2011-08-15 17:44 PDT, Jan Wolter
smichaud: review-
Details | Diff | Splinter Review

Description User image Greg K. 2008-07-29 13:38:22 PDT
As reported in bug 44259, comment 50, some shifted key combinations still incorrectly return a zero keycode on Mac. The reported combinations are as follows.

shift-- (_)
shift-` (~)
shift-\ (|)
shift-, (<)
shift-. (>)
shift-/ (?)
shift-; (:)
Comment 1 User image Steven Michaud [:smichaud] (Retired) 2008-08-15 13:03:25 PDT
I've confirmed this (using attachment 246186 [details], originally from bug
44250), on FF3.0.1, a recent Firefox trunk (1.9.1-branch) nightly, and
a recent Camino 1.9.0-branch nightly.
Comment 2 User image Peter Phillips 2011-01-13 00:30:22 PST
I'm seeing this on FireFox 3.6.2 under Mac OSX.
Comment 3 User image Conrad Damon 2011-01-13 09:30:32 PST
It'll be part of FF until they fix it. The workaround is to wait for keypress (and translate charCode to keyCode if necessary) or keyup.

It seems odd that the fix for bug 44259 omitted seven characters; you'd think it wouldn't be hard to complete the fix.
Comment 4 User image Jan Wolter 2011-08-15 17:44:33 PDT
Created attachment 553319 [details] [diff] [review]
A completely untested path for this bug.

I don't even have a working Mac right now, so I can't compile Mozilla or test it, but I've been waiting eleven years for this bug to be fixed, and it's not that hard.  I'm reasonably confident that this will make the keycodes on keyup and keydown events on the Macintosh match those on Windows and Linux for US keyboards. Since the code as currently written maps character codes to keycodes, I'm not at all sure that that is the right approach for international keyboards, but, if not, that is probably a different bug. This just fixes the fact that the current code returns zero for many shifted symbol characters, instead of returning the same code as the unshifted key does, and fixes the incorrect keypad plus code being returned for the keyboard plus key.
Comment 5 User image Chris Lawson (gone) 2011-09-16 11:48:58 PDT
I'm pretty sure kreeger isn't actively working on this code any more; you might want to find someone else to review it.

Josh or Steven, do you know of anyone who'd be a good r? for this?
Comment 6 User image Steven Michaud [:smichaud] (Retired) 2011-09-16 14:15:29 PDT
I can review this.  I'll do it in sync with my reviews of Masayuki's patches for bug 677252.  I hope to get to them next week.
Comment 7 User image Steven Michaud [:smichaud] (Retired) 2011-10-13 13:15:06 PDT
The testcase I used in comment #1 is still available.  I used it to confirm that Masayuki's patches for bug 677252 do indeed fix this bug.

Here's a tryserver build made with those patches:

https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/masayuki@d-toybox.com-5dfc229cc591/try-macosx64/firefox-10.0a1.en-US.mac.dmg

Please test with it and let us know your results.
Comment 8 User image Steven Michaud [:smichaud] (Retired) 2011-10-31 12:58:36 PDT
Comment on attachment 553319 [details] [diff] [review]
A completely untested path for this bug.

In light of what I said in comment #7, this is unneeded.
Comment 9 User image Wayne Mery (:wsmwk, NI for questions) 2013-10-11 03:00:36 PDT
per comment 7

Note You need to log in before you can comment on or make changes to this bug.