When holding down the alt(option) key in Mac OS X (10.3.9 and 10.4) the evt.keyCode is reported as 0

RESOLVED DUPLICATE of bug 44259

Status

()

Firefox
Disability Access
RESOLVED DUPLICATE of bug 44259
13 years ago
12 years ago

People

(Reporter: Nate Rock, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozialla/5.0 (Macintosh;U; PPC Mac OS X Mach-0;en-US;rv.1.7.9)Gecko/20050711 Firefox/1.0.5

returns 0 for any button pressed while holding down the "alt" key when trying 
to use the event.keyCode javascript function.

Reproducible: Always

Steps to Reproduce:
1.hold down alt key
2.hit any other key
3.the event.keycode is reported as 0 for every key

Actual Results:  
javascript broke because it was checking on keycode

Expected Results:  
reported the correct numeric value (keycode) designated to the key pressed

See the attached HTML example. Tried it on Firfox 1.0.5 on Windows XP (SP2) and 
Mac OS X 10.4. 

results: 
hit alt-l on windows - evt.keyCode=76 evt.altKey=true
hit alt-l on mac     - evt.keyCode=0  evt.altKey=true
(Reporter)

Comment 1

13 years ago
Created attachment 189226 [details]
Example code showing the altkey error.

Comment 2

13 years ago
Dupe of bug 112379?
(Reporter)

Comment 3

13 years ago
might possibly be a dupe but I narrowed this down to a very specific instace we 
instructions on exactly which os/browser/key combos were creating the bug. the 
one you listed had a vauge discription of "event.keyCode doesn't always return 
correct value" or something which doesn't really help the devlopers. The bug 
outlined in this occurs on Mac OS X 10.3.9/10.4 using Firefox 1.0.5 if you look 
at the included example page the event.keycode returned while holding down the 
alt key and pressing another key will AWLAYS return 0...

cheers

Comment 4

13 years ago
Note that this also happens on Mac OS X 10.2.8

Comment 5

12 years ago

*** This bug has been marked as a duplicate of 44259 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.