]> git.wh0rd.org - tt-rss.git/blob - plugins/googlereaderkeys/init.php
googlereaderkeys: add u hotkey
[tt-rss.git] / plugins / googlereaderkeys / init.php
1 <?php
2 class GoogleReaderKeys extends Plugin {
3 private $host;
4
5 function about() {
6 return array(1.0,
7 "Keyboard hotkeys emulate Google Reader",
8 "markwaters");
9 }
10
11 function init($host) {
12 $this->host = $host;
13
14 $host->add_hook($host::HOOK_HOTKEY_MAP, $this);
15 }
16
17 function hook_hotkey_map($hotkeys) {
18
19 $hotkeys["j"] = "next_article_noscroll";
20 $hotkeys["k"] = "prev_article_noscroll";
21 $hotkeys["*n"] = "next_feed";
22 $hotkeys["*p"] = "prev_feed";
23 $hotkeys["v"] = "open_in_new_window";
24 $hotkeys["r"] = "feed_refresh";
25 $hotkeys["m"] = "toggle_unread";
26 $hotkeys["u"] = "collapse_sidebar";
27 $hotkeys["o"] = "toggle_expand";
28 $hotkeys["(13)|enter"] = "toggle_expand";
29 $hotkeys["*(191)|?"] = "help_dialog";
30 $hotkeys["(32)|space"] = "next_article";
31 $hotkeys["(38)|up"] = "article_scroll_up";
32 $hotkeys["(40)|down"] = "article_scroll_down";
33
34 return $hotkeys;
35 }
36
37 function api_version() {
38 return 2;
39 }
40
41 }