While working on some mac-menu bugs/enhancements in XP code, i found out that nsMacEventHandler sends 0 as the keycode for many keys. Apparently, this only applies to the keypress event (and not to keydoewn / keyup events).
Created attachment 175932 [details] [diff] [review] proposed patch While this does fix this issue, I have to say, ftang's code is unreadable (the hard tabs don't help either) and proably worths rewrite. However, I don't think we should ever sent 0 as the keycode...
14 years ago
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.8beta2
It seems like the original change (in bug 41305) deliberately set either the charCode or the keyCode, but not both. Was there a reason for that? We should make sure we match what Windows does.
For keypress, charCode should be set for "character" keys, and keyCode should be set for all other keys. Changing this willy-nilly would break a lot of JS content out there, I suspect...
Comment on attachment 175932 [details] [diff] [review] proposed patch this one is wrong
As i understand it now, for charcaters |keycode=0; charcode=ascii value|; This works fine. -> invalid.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Depends on: 23363
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.