From: Cheng Zhao Date: Fri, 29 Nov 2013 08:31:38 +0000 (+0800) Subject: Add "Cmd" and "Control" alias for "Command" and "Ctrl". X-Git-Tag: v0.7.4~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7d5826df855457ad2bc3217638992e0410f9f074;p=electron.git Add "Cmd" and "Control" alias for "Command" and "Ctrl". --- diff --git a/browser/ui/accelerator_util.cc b/browser/ui/accelerator_util.cc index b2aadb93..625dee76 100644 --- a/browser/ui/accelerator_util.cc +++ b/browser/ui/accelerator_util.cc @@ -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)