From 3effa6f20c48219bebea66a4b6f3250697be199d Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 11 Feb 2019 11:13:13 -0800 Subject: [PATCH] feat: add support for scroll lock accelerator (#16873) --- atom/common/keyboard_util.cc | 2 ++ docs/api/accelerator.md | 1 + 2 files changed, 3 insertions(+) diff --git a/atom/common/keyboard_util.cc b/atom/common/keyboard_util.cc index f9f3f9aea521..35034a500285 100644 --- a/atom/common/keyboard_util.cc +++ b/atom/common/keyboard_util.cc @@ -42,6 +42,8 @@ ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& s, return ui::VKEY_CAPITAL; } else if (str == "numlock") { return ui::VKEY_NUMLOCK; + } else if (str == "scrolllock") { + return ui::VKEY_SCROLL; } else if (str == "tab") { return ui::VKEY_TAB; } else if (str == "num0") { diff --git a/docs/api/accelerator.md b/docs/api/accelerator.md index 1fda1fe872e8..7bbccd4bc54e 100644 --- a/docs/api/accelerator.md +++ b/docs/api/accelerator.md @@ -60,6 +60,7 @@ The `Super` key is mapped to the `Windows` key on Windows and Linux and * `Tab` * `Capslock` * `Numlock` +* `Scrolllock` * `Backspace` * `Delete` * `Insert`