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