feat: support capslock and numlock as accelerators (#16719)

* feat: support capslock as accelerator

* also add numlock
This commit is contained in:
Shelley Vohr 2019-02-04 15:54:59 -08:00 committed by GitHub
parent f142aae9eb
commit 698d348168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -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") {

View file

@ -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`