Add "Cmd" and "Control" alias for "Command" and "Ctrl".

This commit is contained in:
Cheng Zhao 2013-11-29 16:31:38 +08:00
parent 9493c1b0bb
commit 7d5826df85

View file

@ -105,9 +105,9 @@ bool StringToAccelerator(const std::string& description,
key = KeyboardCodeFromCharCode(tokens[i][0], &shifted);
if (shifted)
modifiers |= ui::EF_SHIFT_DOWN;
} else if (tokens[i] == "ctrl") {
} else if (tokens[i] == "ctrl" || tokens[i] == "control") {
modifiers |= ui::EF_CONTROL_DOWN;
} else if (tokens[i] == "command") {
} else if (tokens[i] == "cmd" || tokens[i] == "command") {
modifiers |= ui::EF_COMMAND_DOWN;
} else if (tokens[i] == "commandorcontrol" || tokens[i] == "cmdorctrl") {
#if defined(OS_MACOSX)