Skip to content

Commit

Permalink
feat: support capslock and numlock as accelerators (backport: 5-0-x) (#…
Browse files Browse the repository at this point in the history
…16725)

* feat: support capslock as accelerator

* also add numlock
  • Loading branch information
trop[bot] authored and codebytere committed Feb 11, 2019
1 parent 14c3962 commit 30cc82d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions atom/common/keyboard_util.cc
Expand Up @@ -38,6 +38,10 @@ ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& s,
} else if (str == "plus") {
*shifted = true;
return ui::VKEY_OEM_PLUS;
} else if (str == "capslock") {
return ui::VKEY_CAPITAL;
} else if (str == "numlock") {
return ui::VKEY_NUMLOCK;
} else if (str == "tab") {
return ui::VKEY_TAB;
} else if (str == "num0") {
Expand Down
2 changes: 2 additions & 0 deletions docs/api/accelerator.md
Expand Up @@ -58,6 +58,8 @@ The `Super` key is mapped to the `Windows` key on Windows and Linux and
* `Plus`
* `Space`
* `Tab`
* `Capslock`
* `Numlock`
* `Backspace`
* `Delete`
* `Insert`
Expand Down

0 comments on commit 30cc82d

Please sign in to comment.