Need to use VK_ keyCode constants in .js files

NEW
Unassigned

Status

()

P3
minor
18 years ago
8 months ago

People

(Reporter: aaronlev, Unassigned)

Tracking

({helpwanted})

Trunk
Future
x86
Windows 98
helpwanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [keybnd][wgate])

(Reporter)

Description

18 years ago
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

18 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

18 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

18 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

18 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

18 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 7

18 years ago
moving to future
Keywords: helpwanted
Target Milestone: M19 → Future

Comment 8

18 years ago
Updating QA Contact.
QA Contact: janc → lorca
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

18 years ago
Whiteboard: [keybnd]

Comment 10

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

Updated

17 years ago
URL: -
Whiteboard: [keybnd] → [keybnd][wgate]

Updated

17 years ago
QA Contact: madhur → rakeshmishra

Updated

16 years ago
QA Contact: rakeshmishra → trix
QA Contact: trix → events

Comment 11

8 months ago
Akkana, are you still working on this?
Also, it seems .keyCode is deprecated.
Flags: needinfo?(akkzilla)

Comment 12

8 months ago
No, sorry, I don't even have a copy of the codebase any more.
Assignee: akkzilla → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(akkzilla)
You need to log in before you can comment on or make changes to this bug.