OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <AppKit/NSEvent.h> | 5 #include <AppKit/NSEvent.h> |
6 #include <Carbon/Carbon.h> | 6 #include <Carbon/Carbon.h> |
7 | 7 |
8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 {true, false, false, false, kVK_ANSI_5, 0, IDC_SELECT_TAB_4}, | 44 {true, false, false, false, kVK_ANSI_5, 0, IDC_SELECT_TAB_4}, |
45 {true, false, false, false, kVK_ANSI_Keypad5, 0, IDC_SELECT_TAB_4}, | 45 {true, false, false, false, kVK_ANSI_Keypad5, 0, IDC_SELECT_TAB_4}, |
46 {true, false, false, false, kVK_ANSI_6, 0, IDC_SELECT_TAB_5}, | 46 {true, false, false, false, kVK_ANSI_6, 0, IDC_SELECT_TAB_5}, |
47 {true, false, false, false, kVK_ANSI_Keypad6, 0, IDC_SELECT_TAB_5}, | 47 {true, false, false, false, kVK_ANSI_Keypad6, 0, IDC_SELECT_TAB_5}, |
48 {true, false, false, false, kVK_ANSI_7, 0, IDC_SELECT_TAB_6}, | 48 {true, false, false, false, kVK_ANSI_7, 0, IDC_SELECT_TAB_6}, |
49 {true, false, false, false, kVK_ANSI_Keypad7, 0, IDC_SELECT_TAB_6}, | 49 {true, false, false, false, kVK_ANSI_Keypad7, 0, IDC_SELECT_TAB_6}, |
50 {true, false, false, false, kVK_ANSI_8, 0, IDC_SELECT_TAB_7}, | 50 {true, false, false, false, kVK_ANSI_8, 0, IDC_SELECT_TAB_7}, |
51 {true, false, false, false, kVK_ANSI_Keypad8, 0, IDC_SELECT_TAB_7}, | 51 {true, false, false, false, kVK_ANSI_Keypad8, 0, IDC_SELECT_TAB_7}, |
52 {true, false, false, false, kVK_ANSI_9, 0, IDC_SELECT_LAST_TAB}, | 52 {true, false, false, false, kVK_ANSI_9, 0, IDC_SELECT_LAST_TAB}, |
53 {true, false, false, false, kVK_ANSI_Keypad9, 0, IDC_SELECT_LAST_TAB}, | 53 {true, false, false, false, kVK_ANSI_Keypad9, 0, IDC_SELECT_LAST_TAB}, |
54 {true, true, false, false, 0, 'm', IDC_SHOW_AVATAR_MENU}, | |
Robert Sesek
2011/10/20 16:32:33
nit: columnar alignment, as above
sail
2011/10/20 20:42:49
Done.
| |
54 }; | 55 }; |
55 | 56 |
56 *num_entries = arraysize(keyboard_shortcuts); | 57 *num_entries = arraysize(keyboard_shortcuts); |
57 | 58 |
58 return keyboard_shortcuts; | 59 return keyboard_shortcuts; |
59 } | 60 } |
60 | 61 |
61 const KeyboardShortcutData* GetDelayedWindowKeyboardShortcutTable( | 62 const KeyboardShortcutData* GetDelayedWindowKeyboardShortcutTable( |
62 size_t* num_entries) { | 63 size_t* num_entries) { |
63 static const KeyboardShortcutData keyboard_shortcuts[] = { | 64 static const KeyboardShortcutData keyboard_shortcuts[] = { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
214 return rawChar; | 215 return rawChar; |
215 } | 216 } |
216 | 217 |
217 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8). | 218 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8). |
218 if ([event modifierFlags] & NSAlternateKeyMask) | 219 if ([event modifierFlags] & NSAlternateKeyMask) |
219 return [characters characterAtIndex:0]; | 220 return [characters characterAtIndex:0]; |
220 } | 221 } |
221 | 222 |
222 return [eventString characterAtIndex:0]; | 223 return [eventString characterAtIndex:0]; |
223 } | 224 } |
OLD | NEW |