From: Cheng Zhao Date: Fri, 23 Jan 2015 23:26:54 +0000 (-0800) Subject: Add support for `Plus` as accelerator key, fixes #1050 X-Git-Tag: v0.20.8~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=33b6876cc147a25f281b5973e45fe26b038face5;p=electron.git Add support for `Plus` as accelerator key, fixes #1050 --- diff --git a/atom/browser/ui/accelerator_util.cc b/atom/browser/ui/accelerator_util.cc index 5a840dfb..4978b102 100644 --- a/atom/browser/ui/accelerator_util.cc +++ b/atom/browser/ui/accelerator_util.cc @@ -121,6 +121,9 @@ bool StringToAccelerator(const std::string& description, modifiers |= ui::EF_ALT_DOWN; } else if (tokens[i] == "shift") { modifiers |= ui::EF_SHIFT_DOWN; + } else if (tokens[i] == "plus") { + modifiers |= ui::EF_SHIFT_DOWN; + key = ui::VKEY_OEM_PLUS; } else if (tokens[i] == "tab") { key = ui::VKEY_TAB; } else if (tokens[i] == "space") { diff --git a/docs/api/accelerator.md b/docs/api/accelerator.md index 0cfb2d28..58c57d45 100644 --- a/docs/api/accelerator.md +++ b/docs/api/accelerator.md @@ -28,6 +28,7 @@ Linux and Windows to define some accelerators. * `A` to `Z` * `F1` to `F24` * Punctuations like `~`, `!`, `@`, `#`, `$`, etc. +* `Plus` * `Space` * `Backspace` * `Delete`