summaryrefslogtreecommitdiffstats
path: root/chrome/browser/global_keyboard_shortcuts_mac.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 15:24:04 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 15:24:04 +0000
commit066679366f3927cb3d31e79cba7ed6276cff6956 (patch)
tree2cc3ad9e98af684ba9e3a11f58d4b950b4965748 /chrome/browser/global_keyboard_shortcuts_mac.h
parent0b1e48ab573de1990eaf6abed34f627903b588ac (diff)
downloadchromium_src-066679366f3927cb3d31e79cba7ed6276cff6956.zip
chromium_src-066679366f3927cb3d31e79cba7ed6276cff6956.tar.gz
chromium_src-066679366f3927cb3d31e79cba7ed6276cff6956.tar.bz2
Fix cmd-opt-left/right.
This surfaced because I moved global shortcut handling before menu dispatch recently, and global keyboard handling didn't look at the opt button, so it thought cmd-opt-left meant cmd-left and swallowed the event. BUG=25396 TEST=Focus text box in web. cmd-opt-left/right should switch tabs, cmd-left/right should move cursor in text box. Focus web background. cmd-opt-left/right should switch tabs, cmd-left/right should do history navigation. Focus omnibox. cmd-opt-left/right should still switch tabs, cmd-left/right should move cursor. cmd-1/2 should switch tabs in all three places, cmd-opt-1/2 should not do anything. Review URL: http://codereview.chromium.org/313004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/global_keyboard_shortcuts_mac.h')
-rw-r--r--chrome/browser/global_keyboard_shortcuts_mac.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.h b/chrome/browser/global_keyboard_shortcuts_mac.h
index ca24dd4..13a4587 100644
--- a/chrome/browser/global_keyboard_shortcuts_mac.h
+++ b/chrome/browser/global_keyboard_shortcuts_mac.h
@@ -11,6 +11,7 @@ struct KeyboardShortcutData {
bool command_key;
bool shift_key;
bool cntrl_key;
+ bool opt_key;
int vkey_code; // Virtual Key code for the command.
int chrome_command; // The chrome command # to execute for this shortcut.
};
@@ -34,13 +35,15 @@ struct KeyboardShortcutData {
// opportunity to override the shortcut (with the exception of the tab contents,
// which first checks if the current web page wants to handle the shortcut).
int CommandForWindowKeyboardShortcut(
- bool command_key, bool shift_key, bool cntrl_key, int vkey_code);
+ bool command_key, bool shift_key, bool cntrl_key, bool opt_key,
+ int vkey_code);
// This returns shortcuts that should work only if the tab contents have focus
// (e.g. cmd-left, which shouldn't do history navigation if e.g. the omnibox has
// focus).
int CommandForBrowserKeyboardShortcut(
- bool command_key, bool shift_key, bool cntrl_key, int vkey_code);
+ bool command_key, bool shift_key, bool cntrl_key, bool opt_key,
+ int vkey_code);
// For testing purposes.
const KeyboardShortcutData* GetWindowKeyboardShortcutTable(size_t* num_entries);