Bug 88817 - wrong keyboard modifier state
Summary: wrong keyboard modifier state
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-04 11:46 UTC by Idea
Modified: 2017-06-16 08:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Idea 2004-09-04 11:46:44 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    FreeBSD Ports
Compiler:          gcc (GCC) 3.3.3 [FreeBSD] 20031106 
OS:                FreeBSD

When I'm using the event handler document.onkeypress in javascript, and in the handler function I read the keycode of the key, if the key is any arrow key/PgUp/PgDn and mybe some more keys, the event.which and e.keyCode are both 0 - thus I can't resolve these keys.
Comment 1 Idea 2004-09-04 12:05:04 UTC
Here you can see the defect here. If some debugging info needed, I can add it (e.g. those mentioned codes)
http://sg1.homeunix.org/~idea/ideol/frameset.php
Comment 2 apm13 2004-09-16 01:57:30 UTC
I confirm this bug, and I think it is more serious than just a wishlist item.  All arrow keys give keycode 0 as can be seen here:

http://www.dansteinman.com/dynduo/examples/keystrokes-box.html
Comment 3 Tomas Simonaitis 2004-09-22 13:18:56 UTC
I can confirm this bug too, imho it should be marked as bug not whishlist.
Comment 4 Idea 2004-09-22 17:53:36 UTC
OK, but how do I change it to bug?
Comment 5 Krzysztof Woźnica 2005-01-01 22:57:31 UTC
Also modifiers are always undefined. Keys not reported by event handler: function keys [PC], insert, home, end, pgup, pgdown, arrow keys and tab.
I think this shuld be treat as a bug.
Comment 6 Krzysztof Woźnica 2005-01-01 22:58:53 UTC
Also modifiers are always undefined. Keys not reported by event handler: function keys [PC], insert, home, end, pgup, pgdown, arrow keys and tab.
I think this shuld be treat as a bug.
Comment 7 Harri Porten 2005-02-27 06:17:18 UTC
90% fixed now. There's still some before/after mixup of modifiers on press and release events.
Comment 8 Luke 2007-03-30 20:58:24 UTC
On kubuntu feisty: I just noticed that if I press pgup in the conversation view in gmail, the conversation is marked as spam. According to gmail documentation, this should happen when I press "!", not pgup. Firefox has the correct behavior, so I believe it is not simply a programming error in gmail.
Comment 9 Gérard Talbot (no longer involved) 2010-03-29 22:41:44 UTC
Hello all,

Is this bug still active?

http://sg1.homeunix.org/~idea/ideol/frameset.php
is unretrievable

http://www.dansteinman.com/dynduo/examples/keystrokes-box.html
is 404 not found

Interactive meta-testcases on Key events (charCode, which, keyCode):

DOM Sample - KeyEvent:Properties
http://www.din.or.jp/~hagi3/JavaScript/JSTips/Mozilla/Samples/KeyEvent.htm

Tests: Évenements clavier
http://dev.webnaute.net/DOM/Events/keyboardEvent/

Keyboard Events and Codes
http://www.w3.org/2002/09/tests/keys.html


With Konqueror 4.4.0, I can see the keyCode (and its correct, expected value) for non-printable characters like arrow keys, Home, End, PgUp, PgDn, insert, delete, tab for keypress events. keyCode for Function keys (F1 to F12) are not consistently reported. 
charCode should be 0 for non-printable characters in all browsers and charCode is 0 for non-printable characters in Konqueror 4.4.0.

The event property evt.which is DOM 0 and is not forward-compatible, therefore not recommendable, not trustworthy. 

DOM 3 Events interface
6.3.3 Key identifiers, keyCode, and charCode
http://www.w3.org/TR/DOM-Level-3-Events/#keyset-keyCode-charCode

regards, Gérard
Comment 10 Gérard Talbot (no longer involved) 2011-01-03 04:40:40 UTC
Hello,

I got expected results with Konqueror 4.4.0 and I still get these with Konqueror 4.5.4. 

Please somebody RESOLVE this bug as WORKSFORME.

regards, Gérard
Comment 11 groot 2017-06-16 08:07:10 UTC
See comment:10