Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support capslock and numlock as accelerators (backport: 5-0-x) #16725

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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