WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
34002
The key event when pressing AltGr+<Keystroke> sets ctrlKey=true (observable with Polish)
https://bugs.webkit.org/show_bug.cgi?id=34002
Summary
The key event when pressing AltGr+<Keystroke> sets ctrlKey=true (observable w...
jeff.s.harris
Reported
2010-01-22 07:28:50 PST
1) Set your Windows language to Polish 2) Open a new session with Safari Windows or Chrome Windows 3) Visit this site:
http://unixpapa.com/js/testkey.html
4) Put your cursor in the textbox 5) Press <Right Alt>+e Result: The keypress event sets e.altKey=true (good).. but then it also sets e.ctrlKey = true... even though the ctrlKey is not hit. This reproed in all version of Windows Webkit that I tested Expected Result: e.altKey=true and e.ctrlKey = false. Firefox fires the expected keypress events
Attachments
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2010-01-22 07:40:39 PST
I can't get a keypress event to fire because Alt+E brings up the Edit menu. But the keydown event that's generated has altKey=true and ctrlKey=false. So, I don't think I'm able to reproduce.
jeff.s.harris
Comment 2
2010-01-22 07:44:05 PST
If you change the OS input language to Polish (in XP -> Control Panel -> Regional and Languages -> Languages -> Details) it won't pull up the right click menu and I'm pretty positive the key event in this case sets ctrl=true Does that work?
Adam Roben (:aroben)
Comment 3
2010-01-22 07:44:20 PST
I was testing in Safari with ToT WebKit on Windows, btw.
jeff.s.harris
Comment 4
2010-01-22 07:45:07 PST
Also it has to be the right alt key for the repro steps I described
Adam Roben (:aroben)
Comment 5
2010-01-22 07:47:39 PST
(In reply to
comment #2
)
> If you change the OS input language to Polish (in XP -> Control Panel -> > Regional and Languages -> Languages -> Details) it won't pull up the right > click menu and I'm pretty positive the key event in this case sets ctrl=true > > Does that work?
Yes, I can reproduce in that case. In fact, just pressing the Alt key is enough to trigger a keydown/keypress event pair that has both altKey=true and ctrlKey=true. This seems to be dependent on the input language; with US English as the input language, pressing the Alt key only sets altKey=true, but not ctrlKey=true.
Alexey Proskuryakov
Comment 6
2010-01-22 13:15:39 PST
Is this a bug, or correct behavior? What do Polish keyboards have engraved on the right Alt key?
jeff.s.harris
Comment 7
2010-01-22 13:34:32 PST
That's a good question. It's the Alt+Gr key, so it's not the same as a control key.
http://freepages.genealogy.rootsweb.ancestry.com/~elainetmaddox/polish_keyboard.jpg
For me, the problem with the current behavior is that my app is listening for keyboard shortcuts based on the ctrl key, but because of this, it thinks that any polish character is a keyboard shortcut (even though it's just a regular key event). Things work great on firefox.
Alexey Proskuryakov
Comment 8
2010-01-22 14:03:34 PST
Also: <
http://en.wikipedia.org/wiki/AltGr_key#Polish
> Yes, this clearly isn't like Alt+Ctrl in any way. So you have data about what IE does for this key?
jeff.s.harris
Comment 9
2010-01-22 14:38:46 PST
Just checked. IE has the same behavior as Webkit for the keypress event (ctrlKey=true) :( Does that mean this shouldn't be fixed?
Alexey Proskuryakov
Comment 10
2010-01-22 15:13:23 PST
We'd need some very strong reasons to change the behavior away from matching IE.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug