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

Unified Diff: chrome/browser/global_keyboard_shortcuts_mac.mm

Issue 2373543003: cocoa browser: bind cmd-opt-l, not cmd-l, for downloads (Closed)
Patch Set: Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/global_keyboard_shortcuts_mac.mm
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm
index 36650530edcf0f23b57585a237f315062bdb2fee..e197c07c39cfc23ce95fb2536f0edefb821ce2c2 100644
--- a/chrome/browser/global_keyboard_shortcuts_mac.mm
+++ b/chrome/browser/global_keyboard_shortcuts_mac.mm
@@ -76,7 +76,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, kVK_ANSI_M, 0, IDC_SHOW_AVATAR_MENU},
- {true, false, false, true, 0, 'l', IDC_SHOW_DOWNLOADS},
+ {true, false, false, true, kVK_ANSI_L, 0, IDC_SHOW_DOWNLOADS},
};
*num_entries = arraysize(keyboard_shortcuts);
@@ -121,6 +121,9 @@ static bool MatchesEventForKeyboardShortcut(
// Expects that one of |key_char| or |vkey_code| is 0.
DCHECK((shortcut.key_char == 0) ^ (shortcut.vkey_code == 0));
if (shortcut.key_char) {
+ // Shortcuts that have a |key_char| and have |opt_key| set are mistakes,
+ // since |opt_key| is not checked when there is a |key_char|.
+ DCHECK(!shortcut.opt_key);
// The given shortcut key is to be matched by a keyboard character.
// In this case we ignore shift and opt (alt) key modifiers, because
// the character may be generated by a combination with those keys.
« 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