summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-07-12 12:25:59 +0400
committerAndrew Dolgov <[email protected]>2011-07-12 12:25:59 +0400
commit2bb3f95783ab85aee689fa3b54fdde7ced817279 (patch)
tree179c3feed7851046eac782d790fb673cfd715f81 /tt-rss.js
parentc252d7c7819d8acc0bbdf5e60ca9b308b4554eb9 (diff)
hotkeys: implement a-prefix hotkeys (a i, a u, a a, a n)
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js30
1 files changed, 28 insertions, 2 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 2d657bca1..1d8d3add8 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -654,7 +654,7 @@ function hotkey_handler(e) {
if (keycode == 16) return; // ignore lone shift
if (keycode == 17) return; // ignore lone ctrl
- if ((keycode == 70 || keycode == 67 || keycode == 71)
+ if ((keycode == 70 || keycode == 67 || keycode == 71 || keycode == 65)
&& !hotkey_prefix) {
var date = new Date();
@@ -766,7 +766,6 @@ function hotkey_handler(e) {
return;
}
-
if (keycode == 85) { // u
selectionToggleUnread(undefined, false, true)
return;
@@ -815,6 +814,33 @@ function hotkey_handler(e) {
}
}
+ /* Prefix a */
+
+ if (hotkey_prefix == 65) { // a
+ hotkey_prefix = false;
+
+ if (keycode == 65) { // a
+ selectArticles('all');
+ return;
+ }
+
+ if (keycode == 85) { // u
+ selectArticles('unread');
+ return;
+ }
+
+ if (keycode == 73) { // i
+ selectArticles('invert');
+ return;
+ }
+
+ if (keycode == 78) { // n
+ selectArticles('none');
+ return;
+ }
+
+ }
+
/* Prefix f */
if (hotkey_prefix == 70) { // f