[Webkit-unassigned] [Bug 89742] [Win] key event's location does not work on Windows platform.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 7 23:28:30 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89742





--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2012-08-07 23:28:52 PST ---
(From update of attachment 149232)
View in context: https://bugs.webkit.org/attachment.cgi?id=149232&action=review

> Source/WebKit/chromium/ChangeLog:10
> +        As WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, and WM_SYSKEYUP doesn't provide
> +        a virtual keycode which distinguish between left-hand and right-hand
> +        keys. So modified keybordEvent to see a scancode and an extended key

You mean in wParam? It's inaccurate to say those window messages don't supply key code that distinguishes left and right keys because they DO in lParam.

> Source/WebKit/chromium/src/win/WebInputEventFactory.cpp:99
> +static int windowsKeycodeWithLocation(WPARAM wparam, LPARAM lParam)

Why is "param" in lParam capitalized?
It appears that the convention is not to capitalize it.

> Source/WebKit/chromium/src/win/WebInputEventFactory.cpp:101
> +    int keycode = static_cast<int>(wparam);

Why are we casting it to int?

> Source/WebKit/chromium/src/win/WebInputEventFactory.cpp:118
> +

Where is the closing } ??

> Source/WebKit/chromium/src/win/WebInputEventFactory.cpp:124
> +    int scancode = (lParam >> 16) & 0xFF;
> +    // WindowsVista or new Windows can support 0xe0 or 0xe1 to specify
> +    // the extended scancode. In this case, if extended key bit is set,
> +    // extended scancode is 0xe000 | scancode or 0xe100 | scancode.
> +    int virtualKeycode = ::MapVirtualKey(scancode, MAPVK_VSC_TO_VK_EX);
> +    return virtualKeyCode ? virtualKeyCode : keycode;

For which virtual key code is this code used?

> Tools/DumpRenderTree/win/EventSender.cpp:486
> +        // Keyboard Scan Code Specification:
> +        // http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
> +        keyData += 0x1d << 16; // Left control's scancode

Why are we not calling MapVirtualKey with MAPVK_VK_TO_VSC?

-- 
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