]> khamidou — GitHub mirrors - electron.git/commitdiff
Add support for `Plus` as accelerator key, fixes #1050
authorCheng Zhao <zcbenz@gmail.com>
Fri, 23 Jan 2015 23:26:54 +0000 (15:26 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 23 Jan 2015 23:26:54 +0000 (15:26 -0800)
atom/browser/ui/accelerator_util.cc
docs/api/accelerator.md

index 5a840dfba1ee5056b04abf4d3d8645098e765db8..4978b102c525df21a127886cf324f4e1fed007e0 100644 (file)
@@ -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") {
index 0cfb2d282c234d0adfcd9a2f82497d9122efcc3e..58c57d4590a12bc46298c040764077697ad82984 100644 (file)
@@ -28,6 +28,7 @@ Linux and Windows to define some accelerators.
 * `A` to `Z`
 * `F1` to `F24`
 * Punctuations like `~`, `!`, `@`, `#`, `$`, etc.
+* `Plus`
 * `Space`
 * `Backspace`
 * `Delete`