| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "base/keyboard_code_conversion_mac.h" | 5 #import "app/keyboard_code_conversion_mac.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #import <Carbon/Carbon.h> | 8 #import <Carbon/Carbon.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "app/logging.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace app { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // A struct to hold a Windows keycode to Mac virtual keycode mapping. | 16 // A struct to hold a Windows keycode to Mac virtual keycode mapping. |
| 17 struct KeyCodeMap { | 17 struct KeyCodeMap { |
| 18 KeyboardCode keycode; | 18 KeyboardCode keycode; |
| 19 int macKeycode; | 19 int macKeycode; |
| 20 unichar characterIgnoringModifiers; | 20 unichar characterIgnoringModifiers; |
| 21 }; | 21 }; |
| 22 | 22 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 else if (macKeycode == kVK_ANSI_Backslash) | 283 else if (macKeycode == kVK_ANSI_Backslash) |
| 284 *character = 28; | 284 *character = 28; |
| 285 else if (macKeycode == kVK_ANSI_RightBracket) | 285 else if (macKeycode == kVK_ANSI_RightBracket) |
| 286 *character = 29; | 286 *character = 29; |
| 287 } | 287 } |
| 288 | 288 |
| 289 // TODO(suzhe): Support characters for Option key bindings. | 289 // TODO(suzhe): Support characters for Option key bindings. |
| 290 return macKeycode; | 290 return macKeycode; |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace base | 293 } // namespace app |
| OLD | NEW |