]>
Commit | Line | Data |
---|---|---|
3afc03b5 AD |
1 | <?php |
2 | class GoogleReaderKeys extends Plugin { | |
3 | ||
4 | private $link; | |
5 | private $host; | |
6 | ||
7 | function about() { | |
8 | return array(1.0, | |
733ef11e | 9 | "Keyboard hotkeys emulate Google Reader", |
3afc03b5 AD |
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 | ||
733ef11e MW |
22 | $hotkeys["j"] = "next_article_noscroll"; |
23 | $hotkeys["k"] = "prev_article_noscroll"; | |
5b18c936 AD |
24 | $hotkeys["*n"] = "next_feed"; |
25 | $hotkeys["*p"] = "prev_feed"; | |
733ef11e MW |
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"; | |
3afc03b5 AD |
31 | |
32 | return $hotkeys; | |
33 | ||
34 | } | |
35 | } | |
36 | ?> |