Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: chrome/browser/global_keyboard_shortcuts_mac.mm

Issue 8718002: Cocoa: Fix avatar menu shortcut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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}, 54 {true, true, false, false, kVK_ANSI_M, 0, IDC_SHOW_AVATAR_MENU},
55 }; 55 };
56 56
57 *num_entries = arraysize(keyboard_shortcuts); 57 *num_entries = arraysize(keyboard_shortcuts);
58 58
59 return keyboard_shortcuts; 59 return keyboard_shortcuts;
60 } 60 }
61 61
62 const KeyboardShortcutData* GetDelayedWindowKeyboardShortcutTable( 62 const KeyboardShortcutData* GetDelayedWindowKeyboardShortcutTable(
63 size_t* num_entries) { 63 size_t* num_entries) {
64 static const KeyboardShortcutData keyboard_shortcuts[] = { 64 static const KeyboardShortcutData keyboard_shortcuts[] = {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return rawChar; 215 return rawChar;
216 } 216 }
217 217
218 // 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).
219 if ([event modifierFlags] & NSAlternateKeyMask) 219 if ([event modifierFlags] & NSAlternateKeyMask)
220 return [characters characterAtIndex:0]; 220 return [characters characterAtIndex:0];
221 } 221 }
222 222
223 return [eventString characterAtIndex:0]; 223 return [eventString characterAtIndex:0];
224 } 224 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698