Open Bug 337965 Opened 16 years ago Updated 4 years ago

Ctrl key doesn't fire keydown (and keyup) event


(Core :: DOM: Events, defect, P5)






(Reporter: mjuhos, Unassigned)


(Keywords: testcase)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv: Gecko/20060426 Firefox/
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv: Gecko/20060426 Firefox/

Key events aren't fired after pressing Ctrl key on MacOs, but they are fired on Windows.

Reproducible: Always

Steps to Reproduce:
1. Open test case on FireFox 1.5 on MacOs
2. Pres Ctrl key

Actual Results:  

Expected Results:  
Text ctrl will be displayed - same behavior as on Windows

Test case:
      onkeydown = function(event) {
        if (event.ctrlKey) {
          document.getElementById('log').innerHTML += 'ctrl ' ;
   <div id=log></div>
Attached file Test case
Keywords: testcase
attachment 94030 [details] also serves as a (slightly less obscure) testcase: I get no ctrl/option/cmd keydowns or keyups with a Mac trunk build.
Assignee: nobody → events
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
related to bug 314870 ? Bug 314870 attachment 8 [details] is a nice testcase.
sounds dupe of bug 44259.
Since bug 44259 comment 18 says it's specifically about the keycode which is sent when a keydown event is fired, and that the event fires, while this is about the events for different keys not firing, it certainly doesn't sound like a dupe to me.
The following looks like it is a manifestation of this bug:

Context: Web-based game with many keyboard shortcuts
Symptom: Cmd-{letter} is passed through to the game as {letter}

Does not occur on the same website when accessed with Windows Firefox.

I would classify this as major. It severely impacts functionality when Cmd-T to open a new tab, instead initiates Travel or Teleport.

If the web page is not set up to use {letter} as a shortcut, Cmd-{letter} functions normally.

This is the site where the behaviour was observed:
Assignee: events → nobody
QA Contact: ian → events

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.