Index: chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm |
diff --git a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm |
index 38004c5fa33de775a6332b374d5342bc453903c6..d94bf013b99aea462d7272960614b332fdf5f238 100644 |
--- a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm |
+++ b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm |
@@ -237,6 +237,10 @@ void AddDuplicateItem(NSMenuItem* top_level_item, |
[[fileMenuItem_ submenu] addItem:[openDoppelganger_ menuItem]]; |
[[fileMenuItem_ submenu] addItem:[NSMenuItem separatorItem]]; |
AddDuplicateItem(fileMenuItem_, IDC_FILE_MENU, IDC_CLOSE_WINDOW); |
+ // Set the expected key equivalent explicitly here because Chrome's key |
+ // equivalent is sometimes "W" (Cmd+Shift+W), and "Close Tab" is mapped to |
+ // Cmd+W. |
+ [[[fileMenuItem_ submenu] itemWithTag:IDC_CLOSE_WINDOW] setKeyEquivalent:@"w"]; |
tapted
2014/01/09 04:35:05
Do you need to hook this up in something like [Dop
jackhou1
2014/01/09 06:18:57
I don't think so. "Close Window" will be Cmd+w whe
|
// Edit menu. This copies the menu entirely and removes |
// "Paste and Match Style" and "Find". This is because the last two items, |