diff options
author | Andrew Dolgov <[email protected]> | 2019-12-04 15:50:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-12-04 15:50:49 +0300 |
commit | 6913158b8291c70cdab79641e771e2e89e11ac3e (patch) | |
tree | 095bd74f19ac83ecd335bf7f23fb608e2ac6d257 /js/tt-rss.js | |
parent | cb92f56b13bcdd48a2db5de8acd26d90819dcc0b (diff) |
add hotkeys to scroll headlines/articles (whichever is active) by one page
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index a31404426..43d057199 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -204,8 +204,8 @@ require(["dojo/_base/kernel", if (event.target.nodeName == "INPUT" || event.target.nodeName == "TEXTAREA") return; // Arrow buttons and escape are not reported via keypress, handle them via keydown. - // escape = 27, left = 37, up = 38, right = 39, down = 40 - if (event.type == "keydown" && event.which != 27 && (event.which < 37 || event.which > 40)) return; + // escape = 27, left = 37, up = 38, right = 39, down = 40, pgup = 33, pgdn = 34 + if (event.type == "keydown" && event.which != 27 && (event.which < 33 || event.which > 40)) return; const action_name = App.keyeventToAction(event); @@ -330,6 +330,12 @@ require(["dojo/_base/kernel", this.hotkey_actions["article_scroll_up"] = function () { Article.scroll(-40); }; + this.hotkey_actions["article_page_down"] = function () { + Article.scrollPages(1); + }; + this.hotkey_actions["article_page_up"] = function () { + Article.scrollPages(-1); + }; this.hotkey_actions["close_article"] = function () { if (App.isCombinedMode()) { Article.cdmUnsetActive(); |