]> git.wh0rd.org - tt-rss.git/commitdiff
allow s, S, u hotkeys to work on selection instead of active article
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 12:30:33 +0000 (15:30 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 12:30:33 +0000 (15:30 +0300)
tt-rss.js

index 9ab2d353a969e0b1a9d9fdb5207644d8767f761f..a3bfbde5d083f8d707cd90b7f3b711b67da4b3b6 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -841,6 +841,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) 
                                && !hotkey_prefix) {
@@ -966,27 +967,18 @@ function hotkey_handler(e) {
                        }
 
                        if (keycode == 83 && shift_key) { // S
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       togglePub(id);
-                               }
+                               selectionTogglePublished(undefined, false, true);
                                return;
                        }
 
                        if (keycode == 83) { // s
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       toggleMark(id);
-                               }
+                               selectionToggleMarked(undefined, false, true);
                                return;
                        }
 
 
                        if (keycode == 85) { // u
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       toggleUnread(id);
-                               }
+                               selectionToggleUnread(undefined, false, true)
                                return;
                        }