| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <windowsx.h> | 5 #include <windowsx.h> |
| 6 | 6 |
| 7 #include "ui/events/event_constants.h" | 7 #include "ui/events/event_constants.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 switch (native_event.message) { | 149 switch (native_event.message) { |
| 150 case WM_KEYDOWN: | 150 case WM_KEYDOWN: |
| 151 case WM_SYSKEYDOWN: | 151 case WM_SYSKEYDOWN: |
| 152 case WM_CHAR: | 152 case WM_CHAR: |
| 153 return ET_KEY_PRESSED; | 153 return ET_KEY_PRESSED; |
| 154 // The WM_DEADCHAR message is posted to the window with the keyboard focus | 154 // The WM_DEADCHAR message is posted to the window with the keyboard focus |
| 155 // when a WM_KEYUP message is translated. This happens for special keyboard | 155 // when a WM_KEYUP message is translated. This happens for special keyboard |
| 156 // sequences. | 156 // sequences. |
| 157 case WM_DEADCHAR: | 157 case WM_DEADCHAR: |
| 158 case WM_KEYUP: | 158 case WM_KEYUP: |
| 159 // The WM_SYSDEADCHAR message is posted to a window with keyboard focus |
| 160 // when the WM_SYSKEYDOWN message is translated by the TranslateMessage |
| 161 // function. It specifies the character code of the system dead key. |
| 162 case WM_SYSDEADCHAR: |
| 159 case WM_SYSKEYUP: | 163 case WM_SYSKEYUP: |
| 160 return ET_KEY_RELEASED; | 164 return ET_KEY_RELEASED; |
| 161 case WM_LBUTTONDBLCLK: | 165 case WM_LBUTTONDBLCLK: |
| 162 case WM_LBUTTONDOWN: | 166 case WM_LBUTTONDOWN: |
| 163 case WM_MBUTTONDBLCLK: | 167 case WM_MBUTTONDBLCLK: |
| 164 case WM_MBUTTONDOWN: | 168 case WM_MBUTTONDOWN: |
| 165 case WM_NCLBUTTONDBLCLK: | 169 case WM_NCLBUTTONDBLCLK: |
| 166 case WM_NCLBUTTONDOWN: | 170 case WM_NCLBUTTONDOWN: |
| 167 case WM_NCMBUTTONDBLCLK: | 171 case WM_NCMBUTTONDBLCLK: |
| 168 case WM_NCMBUTTONDOWN: | 172 case WM_NCMBUTTONDOWN: |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 409 } |
| 406 | 410 |
| 407 LPARAM GetLParamFromScanCode(uint16 scan_code) { | 411 LPARAM GetLParamFromScanCode(uint16 scan_code) { |
| 408 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; | 412 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; |
| 409 if ((scan_code & 0xE000) == 0xE000) | 413 if ((scan_code & 0xE000) == 0xE000) |
| 410 l_param |= (1 << 24); | 414 l_param |= (1 << 24); |
| 411 return l_param; | 415 return l_param; |
| 412 } | 416 } |
| 413 | 417 |
| 414 } // namespace ui | 418 } // namespace ui |
| OLD | NEW |