diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-28 16:16:05 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-28 16:16:05 +0000 |
commit | 413d24d228d77542124d51f2abbabcb7830abf5d (patch) | |
tree | c16debc2d20483208fe338b30457a7efcb563b4c | |
parent | 9fc4a036d1e34404eb63abf5a1265510c63b0448 (diff) | |
download | chromium_src-413d24d228d77542124d51f2abbabcb7830abf5d.zip chromium_src-413d24d228d77542124d51f2abbabcb7830abf5d.tar.gz chromium_src-413d24d228d77542124d51f2abbabcb7830abf5d.tar.bz2 |
Cocoa: Fix avatar menu shortcut
If focus was in the Omnibox then pressing Command-M would incorrectly trigger the avatar menu.
The problem was due to the fact that when MatchesEventForKeyboardShortcut() matches against a key character it ignores the shift flag.
Fix was to use a key code for the shortcut so that the shift flag was correctly checked.
BUG=104457
TEST=Verified that Command-Shift-M correctly showed the avatar menu while focused on a web page and while focused on the location bar. Verified that Command-M correctly minimized the window while focused on a web page and focused on the location bar.
Review URL: http://codereview.chromium.org/8718002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111708 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/global_keyboard_shortcuts_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm index 9076f0c..a5a32de 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac.mm @@ -51,7 +51,7 @@ const KeyboardShortcutData* GetWindowKeyboardShortcutTable( {true, false, false, false, kVK_ANSI_Keypad8, 0, IDC_SELECT_TAB_7}, {true, false, false, false, kVK_ANSI_9, 0, IDC_SELECT_LAST_TAB}, {true, false, false, false, kVK_ANSI_Keypad9, 0, IDC_SELECT_LAST_TAB}, - {true, true, false, false, 0, 'm', IDC_SHOW_AVATAR_MENU}, + {true, true, false, false, kVK_ANSI_M, 0, IDC_SHOW_AVATAR_MENU}, }; *num_entries = arraysize(keyboard_shortcuts); |