Open
Bug 48951
Opened 23 years ago
Updated 1 year ago
Need to use VK_ keyCode constants in .js files
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
NEW
Future
People
(Reporter: aaronlev, Unassigned)
Details
(Keywords: helpwanted, Whiteboard: [keybnd][wgate])
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) BuildID: 200073008 Right now, people are using hard coded constants for keyCode. For example, if (keyCode==13) {dosomething();} That's not good! Should be able to say if (keyCode==VK_ENTER) ... Reproducible: Always Steps to Reproduce: 1. Try to use any VK_ or DOM_VK constant, it doesn't work. 2. 3. Actual Results: - Expected Results: - -
Comment 1•23 years ago
|
||
I'll take this one -- it's related to some other work I'm doing.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → M19
Reassigning to akkana.
Assignee: joki → akkana
Status: ASSIGNED → NEW
Comment 3•23 years ago
|
||
It turns out that most of these are already available, in MouseKeyEvent.idl. I have a fix in my tree (awaiting review and XP testing of a bunch of other associated changes) which makes the NS_VK_* symbols in nsGUIEvent.h dependant on the dom versions of the same symbols (which in turn are generated from MouseKeyEvent.idl), so we'll only have one master copy of the keycode list.
Status: NEW → ASSIGNED
Comment 4•23 years ago
|
||
The symbols come from MouseKeyEvent.idl. The fix I mentioned to reconcile the symbols in widget has been checked in. In theory, you should be able to use the VK_ symbols from JS. In practice, I haven't had a chance to test this. Someone please try it and see if it works!
Reporter | ||
Comment 5•23 years ago
|
||
Akkana, I've just tested this with a cvs build from after your last report. I see that DOM_VK_blah are all defined in MouseKeyEvent.idl, but I get a Javascript 'symbol undefined' error when I try to use one of them. Is there some statement I need in the javascript to make those .idl definitions available?
Comment 6•23 years ago
|
||
The fix to dom/public/idl/events/MouseKeyEvent.idl won't go into the tree, as the rest of dom/public/idl. The results of idlc need to be generated and checked in, to get this into the build. Are those names defined in DOM3? I just saw links to the first public working draft on w3.org, but those aren't public yet. (access denied). Adding jst and vidur for insight in dom standards and building wisdom Axel
Comment 9•23 years ago
|
||
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
Updated•23 years ago
|
Whiteboard: [keybnd]
Updated•22 years ago
|
QA Contact: madhur → rakeshmishra
Updated•21 years ago
|
QA Contact: rakeshmishra → trix
Updated•14 years ago
|
QA Contact: trix → events
![]() |
||
Comment 11•6 years ago
|
||
Akkana, are you still working on this? Also, it seems .keyCode is deprecated.
Flags: needinfo?(akkzilla)
Comment 12•6 years ago
|
||
No, sorry, I don't even have a copy of the codebase any more.
Assignee: akkzilla → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(akkzilla)
Assignee | ||
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
Updated•1 year ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•