[Webkit-unassigned] [Bug 79289] New: nativeKeyCode for WebKeyboardEvent
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 22 15:45:58 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=79289
Summary: nativeKeyCode for WebKeyboardEvent
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Event Handling
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: garykac at chromium.org
Background:
For most platforms, the |nativeKeyCode| field in the WebKeyboardEvent is used to store the native OS key encoding and the |windowsKeyCode| is used to store the Windows virtual key code equivalent (required for the DOM key events).
Windows, however, doesn't record the native key code but instead stores the Windows virtual key code in both the |nativeKeyCode| and |windowsKeyCode| fields. This results in loss of information since the Windows virtual key codes contains a subset of the information found in the native key code. For example, the Windows virtual key code cannot distinguish between a left and a right Shift key press - they are both encoded as VK_SHIFT.
This hasn't caused a problem until now because:
(1) DOM events want the Windows virtual key code
(2) the |nativeKeyCode| is only used to calculate the |windowsKeyCode| (thus, it doesn't need to be set on Windows)
However, if downstream components need more accurate information about the key press, then they need access to the native key information on all platforms.
The fix for this is to simply record the key event's LPARAM in the |nativeKeyCode| field (in Source/WebKit/chromium/src/win/WebInputEventFactory.cpp).
This is safe because the |nativeKeyCode| field isn't used anywhere except in platform-specific code to calculate the |windowsKeyCode|.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list