Skip to content

Commit 33b6876

Browse files
committed
Add support for Plus as accelerator key, fixes electron#1050
1 parent 81b370e commit 33b6876

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

atom/browser/ui/accelerator_util.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ bool StringToAccelerator(const std::string& description,
121121
modifiers |= ui::EF_ALT_DOWN;
122122
} else if (tokens[i] == "shift") {
123123
modifiers |= ui::EF_SHIFT_DOWN;
124+
} else if (tokens[i] == "plus") {
125+
modifiers |= ui::EF_SHIFT_DOWN;
126+
key = ui::VKEY_OEM_PLUS;
124127
} else if (tokens[i] == "tab") {
125128
key = ui::VKEY_TAB;
126129
} else if (tokens[i] == "space") {

docs/api/accelerator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Linux and Windows to define some accelerators.
2828
* `A` to `Z`
2929
* `F1` to `F24`
3030
* Punctuations like `~`, `!`, `@`, `#`, `$`, etc.
31+
* `Plus`
3132
* `Space`
3233
* `Backspace`
3334
* `Delete`

0 commit comments

Comments
 (0)