Index: content/browser/renderer_host/input/web_input_event_builders_win.cc |
diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc |
index 19e8fc617710be0e013ccb54ac325b041f8cd77e..73c9174bfe4d946f77b160f93fe54f3146aa57b6 100644 |
--- a/content/browser/renderer_host/input/web_input_event_builders_win.cc |
+++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc |
@@ -160,7 +160,9 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build(HWND hwnd, |
// NOTE: There doesn't seem to be a way to query the mouse button state in |
// this case. |
- if (LOWORD(lparam) > 1) |
+ // Bit 30 of lParam represents the "previous key state". If set, the key was |
+ // already down, therefore this is an auto-repeat. |
+ if (lparam & 0x40000000) |
result.modifiers |= WebInputEvent::IsAutoRepeat; |
result.modifiers |= GetLocationModifier(wparam, lparam); |