Closed Bug 335538 Opened 20 years ago Closed 15 years ago

ctrlKey, altKey, and timeStamp not registering on certain keypress events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 287172

People

(Reporter: danswer, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2 If you use the ctrl / alt keys to generate a character, then altKey and ctrlKey will not be true on the keyPress event. Reproducible: Always Steps to Reproduce: Install a keyboard layout (Control Panel / Regional and Language Options / Languages / Details / Add ... (I selected UK English) Now bring up the attachment. It will display event properties Once this is done, make sure that the keyboard layout has the new layout selected (usually this setting shows in or near the bottom right tray). Now press ctrl+alt+4 (the key that has the '$') to generate a euro symbol. You may need to press that 4 twice, at least that's how it is with me. While shiftKey reflects whether or not shift was pressed at the time of the keypress event, the control and alt states are not reflected, they just show false. I believe that's incorrect. IE reflects the modifier key states correctly. Another useful key combination is the ctrl+alt+e because it's shifted version produces a capital E with accent. Csaba Gabor from Vienna US keyboards don't have remappings so they won't see this problem. And if the character is not printable (e.g. ctrl+a or ctrl+alt+2), it also doesn't have the problem.
Attached file Event property viewer
This attachment displays (keydown, keypress, and keyup) event properties for the textarea and Test button (and also the .click event of the Test button). If a field is gray, that means that the property was not present. If a field is blank, that means it's taking on the default value (which you can see by mousing over it). These (default value aware) columns have a brown instead of black header. If a cell's value is somewhat ambiguous (such as an empty cell due to a property with an empty string value), the type should be available by mousing over it. Notice that ctrlKey and altKey are not true (the bug) if you enter a printable character by means of having to press the alt and shift key.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: