Closed
Bug 105990
Opened 23 years ago
Closed 11 years ago
VK_ENTER is indistinguishable from VK_RETURN
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
INVALID
mozilla1.2alpha
People
(Reporter: nnooiissee, Unassigned)
References
()
Details
i am trying to give chatzilla in multiline mode (on mac) functionality like mac
aol instant messanger, using return for \n and enter to send, however both
return and enter are mapped to keyCode 13, and VK_ENTER does not seem to work.
what does VK_ENTER do? what is it supposed to do? is it broken? how can i
differentiate mac return (keyCode 13) from mac enter (should be keyCode 3)?
Comment 1•23 years ago
|
||
unfortunately right now, you can't distinguish between them because it would
cause too many other bugs.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•23 years ago
|
Target Milestone: --- → mozilla1.2
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Updated•22 years ago
|
QA Contact: rakeshmishra → trix
Comment 3•20 years ago
|
||
Windows has the same problem -> All.
> differentiate mac return (keyCode 13) from mac enter (should be keyCode 3)?
Actually, the keyCode value should match the W3 values like DOM_VK_RETURN (=13)
and DOM_VK_ENTER (=14).
Hardware: Macintosh → All
Summary: VK_ENTER does not seem to work → VK_ENTER is indistinguishable from VK_RETURN
Updated•19 years ago
|
Assignee: saari → events
Updated•16 years ago
|
Assignee: events → nobody
QA Contact: ian → events
Comment 4•11 years ago
|
||
(In reply to Karsten Düsterloh from comment #3)
> Windows has the same problem -> All.
> > differentiate mac return (keyCode 13) from mac enter (should be keyCode 3)?
>
> Actually, the keyCode value should match the W3 values like DOM_VK_RETURN
> (=13)
> and DOM_VK_ENTER (=14).
Others seem to disagree on this (returning different values), and suggest using KeyboardEvent.location instead to differentiate between VK_RETURN and VK_ENTER:
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from bug 106327, comment #50)
> VK_ENTER must not be used forever because mapping different keyCode values
> to Enter key on standard position and numpad makes web apps broken. For
> example, if numpad's Enter key is mapped to VK_ENTER, it cannot be handled
> by event handlers which only handle VK_RETURN even though they should work
> as same key. If web apps need to know if the pressed key's position, they
> can/should use KeyboardEvent.location. So, DOM Events spec is designed as
> that same function keys must be same information except .location. This
> really does make sense for making key event handlers simple.
Comment 5•11 years ago
|
||
xref bug 969247 - DOM_VK_ENTER don't exist anymore
Comment 6•11 years ago
|
||
Use KeyboardEvent.location or KeyboardEvent.code.
-> INVA
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•