Closed Bug 448434 Opened 12 years ago Closed 7 years ago

Some shifted keys return an incorrect keycode


(Core :: Widget: Cocoa, defect, P3)






(Reporter: bugmail, Assigned: masayuki)




(Whiteboard: [fixed by bug 677252])


(1 file)

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-; (:)
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.
Flags: wanted1.9.1?
Priority: -- → P3
Flags: wanted1.9.1? → wanted1.9.1+
Assignee: joshmoz → nobody
I'm seeing this on FireFox 3.6.2 under Mac OSX.
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.
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.
Attachment #553319 - Flags: review?(nick.kreeger)
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?
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.
Attachment #553319 - Flags: review?(nick.kreeger) → review?(smichaud)
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:

Please test with it and let us know your results.
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.
Attachment #553319 - Flags: review?(smichaud) → review-
per comment 7
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 677252]
Assignee: nobody → masayuki
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.