From 94a82fecd278e79215a1358ae45768dd71a9e72d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 15 May 2008 17:18:29 +0100 Subject: [PATCH] rework hotkeys (2) --- functions.js | 47 +++++++++++++++++++++++++++++++++++++++++------ help/3.php | 27 ++++++++++++++++++++++----- tt-rss.css | 2 +- 3 files changed, 64 insertions(+), 12 deletions(-) diff --git a/functions.js b/functions.js index ed9a08e5..d0169ccb 100644 --- a/functions.js +++ b/functions.js @@ -245,7 +245,7 @@ function hotkey_handler(e) { if (keycode == 16) return; // ignore lone shift - if ((keycode == 70 || keycode == 67) && !hotkey_prefix) { + if ((keycode == 70 || keycode == 67 || keycode == 71) && !hotkey_prefix) { hotkey_prefix = keycode; debug("KP: PREFIX=" + keycode); return; @@ -335,14 +335,23 @@ function hotkey_handler(e) { return; } - if (keycode == 84) { // t - /* FIXME: edit tags */ - return notify_error("Function not implemented"); + if (keycode == 84 && shift_key) { // t + var id = getActiveArticleId(); + if (id) { + editArticleTags(id, getActiveFeedId(), isCdmMode()); + } } if (keycode == 84) { // t - /* FIXME: edit tags */ - return notify_error("Function not implemented"); + var id = getActiveArticleId(); + if (id) { + var cb = document.getElementById("RCHK-" + id); + + if (cb) { + cb.checked = !cb.checked; + toggleSelectRowById(cb, "RROW-" + id); + } + } } if (keycode == 79) { // o @@ -411,6 +420,32 @@ function hotkey_handler(e) { } } + + /* Prefix g */ + + if (hotkey_prefix == 71) { // g + + hotkey_prefix = false; + + if (keycode == 83) { // s + return viewfeed(-1); + } + + if (keycode == 80 && shift_key) { // P + return gotoPreferences(); + } + + if (keycode == 80) { // p + return viewfeed(-2); + } + + if (keycode == 70) { // f + return viewfeed(-3); + } + + + } + /* if (keycode == 48) { // 0 return setHotkeyZone(0); diff --git a/help/3.php b/help/3.php index 28c38e00..21331268 100644 --- a/help/3.php +++ b/help/3.php @@ -16,10 +16,25 @@ sToggle starred shift-SToggle published uToggle unread - tEdit tags + TEdit tags + + + tSelect article under mouse pointer + + tSelect article under mouse pointer + + +

Other actions

+ + + + + +
c fCreate filter
c sCollapse sidebar
?Display this help dialog
+

Feed actions

@@ -34,14 +49,16 @@ f CMark all feeds as read -

Other actions

+

Go to...

- - - + + + +
c fCreate filter
c sCollapse sidebar
?Display this help dialog
g sStarred articles
g fFresh articles
g pPublished articles
g PPreferences
+

Press any key to close this window.

diff --git a/tt-rss.css b/tt-rss.css index 14256b61..a5ab1513 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -674,7 +674,7 @@ span.feed_error { color : red; } -span.insensitive, div.insensitive, li.insensitive, label.insensitive { +span.insensitive, div.insensitive, li.insensitive, label.insensitive, td.insensitive { color : gray; } -- 2.39.5