| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "webkit/glue/webinputevent.h" | 7 #include "webkit/glue/webinputevent.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 keypad = false; | 297 keypad = false; |
| 298 } | 298 } |
| 299 | 299 |
| 300 return keypad; | 300 return keypad; |
| 301 } | 301 } |
| 302 | 302 |
| 303 WebKeyboardEvent::WebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, | 303 WebKeyboardEvent::WebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, |
| 304 LPARAM lparam) { | 304 LPARAM lparam) { |
| 305 system_key = false; | 305 system_key = false; |
| 306 | 306 |
| 307 actual_message.hwnd = hwnd; | |
| 308 actual_message.message = message; | |
| 309 actual_message.wParam = wparam; | |
| 310 actual_message.lParam = lparam; | |
| 311 | |
| 312 windows_key_code = native_key_code = static_cast<int>(wparam); | 307 windows_key_code = native_key_code = static_cast<int>(wparam); |
| 313 | 308 |
| 314 switch (message) { | 309 switch (message) { |
| 315 case WM_SYSKEYDOWN: | 310 case WM_SYSKEYDOWN: |
| 316 system_key = true; | 311 system_key = true; |
| 317 case WM_KEYDOWN: | 312 case WM_KEYDOWN: |
| 318 type = RAW_KEY_DOWN; | 313 type = RAW_KEY_DOWN; |
| 319 break; | 314 break; |
| 320 case WM_SYSKEYUP: | 315 case WM_SYSKEYUP: |
| 321 system_key = true; | 316 system_key = true; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 modifiers |= CTRL_KEY; | 351 modifiers |= CTRL_KEY; |
| 357 if (GetKeyState(VK_MENU) & 0x8000) | 352 if (GetKeyState(VK_MENU) & 0x8000) |
| 358 modifiers |= (ALT_KEY | META_KEY); | 353 modifiers |= (ALT_KEY | META_KEY); |
| 359 | 354 |
| 360 if (LOWORD(lparam) > 1) | 355 if (LOWORD(lparam) > 1) |
| 361 modifiers |= IS_AUTO_REPEAT; | 356 modifiers |= IS_AUTO_REPEAT; |
| 362 if (IsKeyPad(wparam, lparam)) | 357 if (IsKeyPad(wparam, lparam)) |
| 363 modifiers |= IS_KEYPAD; | 358 modifiers |= IS_KEYPAD; |
| 364 } | 359 } |
| 365 | 360 |
| OLD | NEW |