]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/googlereaderkeys/init.php
support disabling of e-mail digests entirely
[tt-rss.git] / plugins / googlereaderkeys / init.php
index 769581908e598819ec8728ca9eeea968e4a3c4b7..ca8b88516dbb5c34b46a31e57941b35f3f6c9375 100644 (file)
@@ -1,17 +1,14 @@
 <?php
 class GoogleReaderKeys extends Plugin {
-
-       private $link;
        private $host;
 
        function about() {
                return array(1.0,
-                       "Keyboard hotkeys like Google Reader",
+                       "Keyboard hotkeys emulate Google Reader",
                        "markwaters");
        }
 
        function init($host) {
-               $this->link = $host->get_link();
                $this->host = $host;
 
                $host->add_hook($host::HOOK_HOTKEY_MAP, $this);
@@ -19,16 +16,25 @@ class GoogleReaderKeys extends Plugin {
 
        function hook_hotkey_map($hotkeys) {
 
-               $hotkeys["j"] = "next_article_noscroll";
-               $hotkeys["N"] = "next_feed";
-               $hotkeys["k"] = "prev_article_noscroll";
-               $hotkeys["P"] = "prev_feed";
-               $hotkeys["v"] = "open_in_new_window";
-               $hotkeys["(32)|space"] = "next_article";
-               $hotkeys["r"] = "feed_refresh";
+               $hotkeys["j"]           = "next_article_noscroll";
+               $hotkeys["k"]           = "prev_article_noscroll";
+               $hotkeys["*n"]          = "next_feed";
+               $hotkeys["*p"]          = "prev_feed";
+               $hotkeys["v"]           = "open_in_new_window";
+               $hotkeys["r"]           = "feed_refresh";
+               $hotkeys["m"]           = "toggle_unread";
+               $hotkeys["o"]           = "toggle_expand";
+               $hotkeys["(13)|enter"]  = "toggle_expand";
+               $hotkeys["*(191)|?"]    = "help_dialog";
+               $hotkeys["(32)|space"]  = "next_article";
+               $hotkeys["(38)|up"]     = "article_scroll_up";
+               $hotkeys["(40)|down"]   = "article_scroll_down";
 
                return $hotkeys;
+       }
 
+       function api_version() {
+               return 2;
        }
-}
-?>
+
+}
\ No newline at end of file