From: Cheng Zhao Date: Fri, 24 May 2013 12:05:51 +0000 (+0800) Subject: Enable '+', ',', '-', '.' in accelerators. X-Git-Tag: v0.1.0~135 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4a79842c4c5fabe0f2baf55c2334033206c9216b;p=electron.git Enable '+', ',', '-', '.' in accelerators. --- diff --git a/browser/accelerator_util.cc b/browser/accelerator_util.cc index 0c642229..f7098062 100644 --- a/browser/accelerator_util.cc +++ b/browser/accelerator_util.cc @@ -69,6 +69,8 @@ bool StringToAccelerator(const std::string& description, key = static_cast(ui::VKEY_A + (tokens[i][0] - 'A')); } else if (tokens[i][0] >= '0' && tokens[i][0] <= '9') { key = static_cast(ui::VKEY_0 + (tokens[i][0] - '0')); + } else if (tokens[i][0] >= '+' && tokens[i][0] <= '.') { + key = static_cast(ui::VKEY_OEM_PLUS + (tokens[i][0] - '+')); } else { LOG(WARNING) << "Invalid accelerator character: " << tokens[i]; key = ui::VKEY_UNKNOWN;