namespace {
-// For Mac, we convert "Ctrl" to "Command" and "MacCtrl" to "Ctrl". Other
-// platforms leave the shortcut untouched.
+// Convert "Command" to "Ctrl" on non-Mac
std::string NormalizeShortcutSuggestion(const std::string& suggestion) {
-#if !defined(OS_MACOSX)
+#if defined(OS_MACOSX)
return suggestion;
#endif
std::vector<std::string> tokens;
base::SplitString(suggestion, '+', &tokens);
for (size_t i = 0; i < tokens.size(); i++) {
- if (tokens[i] == "Ctrl")
- tokens[i] = "Command";
- else if (tokens[i] == "MacCtrl")
+ if (tokens[i] == "Command")
tokens[i] = "Ctrl";
}
return JoinString(tokens, '+');
## Notes on accelerator
-On OS X, the `Ctrl` would automatically translated to `Command`, if you really
-want `Ctrl` on OS X, you should use `MacCtrl`.
+On Linux and Windows, the `Command` would be translated to `Ctrl`, so usually
+you can use `Command` for most of the commands.