Chromium Code Reviews| Index: chrome/browser/resources/extensions/extension_command_list.js |
| =================================================================== |
| --- chrome/browser/resources/extensions/extension_command_list.js (revision 152319) |
| +++ chrome/browser/resources/extensions/extension_command_list.js (working copy) |
| @@ -33,6 +33,8 @@ |
| */ |
| function keystrokeToString(event) { |
| var output = ''; |
| + if (cr.isMac && event.metaKey) |
|
Nico
2012/08/22 14:30:49
Do you need the cr.isMac here?
|
| + output = 'Command+'; |
| if (event.ctrlKey) |
| output = 'Ctrl+'; |
| if (!event.ctrlKey && event.altKey) |
| @@ -232,8 +234,8 @@ |
| event.preventDefault(); |
| event.stopPropagation(); |
| - if (!event.ctrlKey && !event.altKey) |
| - return; // Ctrl or Alt is a must. |
| + if (!event.ctrlKey && !event.altKey && (!cr.isMac || !event.metaKey)) |
| + return; // Ctrl or Alt is a must (or Cmd on Mac). |
| var keystroke = keystrokeToString(event); |
| event.target.textContent = keystroke; |