modifier keys should send KeyDown, KeyUp (windows-only)

RESOLVED WORKSFORME

Status

()

P3
normal
RESOLVED WORKSFORME
19 years ago
8 years ago

People

(Reporter: akkzilla, Unassigned)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
Split off from bug 6649:
We decided when we met regarding the key event spec (see URL field) that
modifier keys by themselves should send the same event sequence as other keys. 
On Windows, pressing shift, alt or control sends KeyDown and KeyUp, but no
KeyPress.

This isn't getting in anyone's way right now -- very low priority -- but it
doesn't fit the spec we agreed on.

Comment 1

19 years ago
make it assign M20
Status: NEW → ASSIGNED
Target Milestone: M20

Comment 2

19 years ago
Move it to M16. Should fix with 5716 together.
Target Milestone: M20 → M16

Updated

19 years ago
Target Milestone: M16 → M17

Comment 3

19 years ago
m16
Target Milestone: M17 → M16

Comment 4

19 years ago
move it back to M20 since we don't have time, no nsbeta2, and no bug depend on 
it.
Target Milestone: M16 → M20

Comment 5

19 years ago
reassign to shanjian
Assignee: ftang → shanjian
Status: ASSIGNED → NEW

Updated

19 years ago
Status: NEW → ASSIGNED

Comment 6

19 years ago
Mass update:  changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer

Comment 7

18 years ago
Updating QA Contact.
QA Contact: ckritzer → lorca

Comment 8

18 years ago
Since pressing shift, alt or control sends KeyDown and KeyUp event on Windows,
IME doesn't work well. (eg. 55751 : Mnemonic doesn't work when IME is on,
Alt-Shift combation doesn't work )
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok

Comment 10

18 years ago
key related issue, reassign back to roy.
roy- do we need this for moz0.9.2 ?
Assignee: shanjian → yokoyama
Status: ASSIGNED → NEW

Comment 11

18 years ago
I think because Mac doesn't do this yet and I'm not sure if Linux does this yet, 
that we don't have to have this yet.  I think we should wait to see a new version 
of the dom keyevent spec that joki was working on earlier this year.

Comment 12

18 years ago
base on brade's message. move it to future.
Target Milestone: --- → Future

Comment 13

18 years ago
QA contact updated
QA Contact: gerardok → madhur

Comment 14

18 years ago
Accepting.
Status: NEW → ASSIGNED

Updated

17 years ago
QA Contact: madhur → rakeshmishra

Comment 15

17 years ago
Created attachment 93099 [details]
Testcase that shows that Alt fires a keydown/keyup, but no other modifiers do

Since its been a year since anyone kicked this bug, I thought I would do so ;-)
as I've just run into a situation where I need the modifier keys to signal at
least keydown/keyup (I didn't test keypress).

I'm running on Linux (SuSE 7.3, KDE 2.2.1), and the Alt modifier key DOES fire
these events, but neither the Shift or Ctrl keys do. Maybe this is due to some
X windows config keymap thingy that I'm not sure of. The fact that this bug is
still outstanding makes me think that this is not the case.

This testcase sets up two capturing handlers for keydown and keyup on the
window's document and focuses the window in the onload.

It would be great if we could get some progress on this bug.

Thanks!

- Bill

Comment 16

16 years ago
note: this bug is Windows-specific; I believe there is a bug for Macintosh OS's
and another bug for Linux (and perhaps other bugs for yet other platforms)
Summary: modifier keys should send KeyDown, KeyPress, KeyUp → modifier keys should send KeyDown, KeyPress, KeyUp (windows-only)

Updated

16 years ago
QA Contact: rakeshmishra → trix

Comment 17

15 years ago
Please remove "KeyPress" from the summary. 
  
KeyPress events are not generated for Alt, Shift and Ctrl by design. This is a  
non-standard event (not covered by the DOM Events model) and we're free to  
handle it as we please. In this case, IE compatibility becomes our main goal.  
IE generates KeyPress only for:  
  
Letters: A - Z (uppercase and lowercase)   
Numerals: 0 - 9   
Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~   
System: ESC, SPACEBAR, ENTER  
  
See:  
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onkeypress.asp  
  
The intention is to make KeyPress behave more like DOM3's TextEvent..  
  
On the other hand, KeyUp and KeyDown MUST be generated for Alt/Shift/Ctrl.  
Summary updated.
Summary: modifier keys should send KeyDown, KeyPress, KeyUp (windows-only) → modifier keys should send KeyDown, KeyUp (windows-only)
QA Contact: trix → events
Nowadays, keydown event and keyup event are dispatched by all modifier keys. And keypress event isn't dispatched but it's correct behavior on CSS3.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-keyboard-event-order

We can mark this as WFM now.
Assignee: tetsuroy → nobody
Severity: trivial → normal
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Component: Event Handling → Widget: Win32
QA Contact: events → win32
Resolution: --- → WORKSFORME
Target Milestone: Future → ---
You need to log in before you can comment on or make changes to this bug.