Browse Source

Add support for `Plus` as accelerator key, fixes #1050

Cheng Zhao 10 years ago
parent
commit
33b6876cc1
2 changed files with 4 additions and 0 deletions
  1. 3 0
      atom/browser/ui/accelerator_util.cc
  2. 1 0
      docs/api/accelerator.md

+ 3 - 0
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") {

+ 1 - 0
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`