summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/functions.php2
-rw-r--r--js/Article.js14
-rw-r--r--js/tt-rss.js10
3 files changed, 24 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index 0f5464990..0a3082ec1 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1121,6 +1121,8 @@
"*(40)|Shift+Down" => "article_scroll_down",
"^(38)|Ctrl+Up" => "prev_article_noscroll",
"^(40)|Ctrl+Down" => "next_article_noscroll",
+ "(33)|Page Up" => "article_page_up",
+ "(34)|Page Down" => "article_page_down",
"/" => "search_dialog",
"s" => "toggle_mark",
"S" => "toggle_publ",
diff --git a/js/Article.js b/js/Article.js
index 970234818..e40e1fca0 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -314,6 +314,20 @@ define(["dojo/_base/declare"], function (declare) {
else
return 0;
},
+ scrollPages: function (offset) {
+ if (!App.isCombinedMode()) {
+ const ci = $("content-insert");
+ if (ci) {
+ ci.scrollTop += ci.offsetHeight * offset * 0.9;
+ }
+ } else {
+ const hi = $("headlines-frame");
+ if (hi) {
+ hi.scrollTop += hi.offsetHeight * offset * 0.9;
+ }
+
+ }
+ },
scroll: function (offset) {
if (!App.isCombinedMode()) {
const ci = $("content-insert");
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();