Closed Bug 1015028 Opened 11 years ago Closed 10 years ago

Should compute scancode from virtual keycode at computing KeyboardEvent.code value if the key message doesn't have proper scancode

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
D3E defines the behavior in this situation like this: https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#code-virtual-keyboards If scancode is properly set, we should compute .code value with it. Otherwise, we should map code value from virtual keycode as far as possible for web apps which expect that .code value is set in all cases.
Attached patch PatchSplinter Review
I realized that the multimedia keys which are mapped with virtual keycode can be mapped only with scancode. This is not completely emulating physical keyboard behavior. MapVirtualKeyEx() returns non-extended key's scancode as far as possible. Therefore, e.g., VK_DOWN causes "Numpad2" rather than "ArrowDown" even if NumLock is unlocked. I feel that this is not better behavior. However, I also don't have better and smarter implementation for some extended keys since any virtual keycodes might be mapped to different physical keys.
Attachment #8427640 - Attachment is obsolete: true
Attachment #8428566 - Flags: review?(jmathies)
Attachment #8428566 - Flags: review?(jmathies) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: