]>
Commit | Line | Data |
---|---|---|
3afc03b5 AD |
1 | <?php |
2 | class GoogleReaderKeys extends Plugin { | |
3afc03b5 AD |
3 | private $host; |
4 | ||
5 | function about() { | |
6 | return array(1.0, | |
733ef11e | 7 | "Keyboard hotkeys emulate Google Reader", |
3afc03b5 AD |
8 | "markwaters"); |
9 | } | |
10 | ||
11 | function init($host) { | |
3afc03b5 AD |
12 | $this->host = $host; |
13 | ||
14 | $host->add_hook($host::HOOK_HOTKEY_MAP, $this); | |
15 | } | |
16 | ||
17 | function hook_hotkey_map($hotkeys) { | |
18 | ||
733ef11e MW |
19 | $hotkeys["j"] = "next_article_noscroll"; |
20 | $hotkeys["k"] = "prev_article_noscroll"; | |
5b18c936 AD |
21 | $hotkeys["*n"] = "next_feed"; |
22 | $hotkeys["*p"] = "prev_feed"; | |
733ef11e MW |
23 | $hotkeys["v"] = "open_in_new_window"; |
24 | $hotkeys["r"] = "feed_refresh"; | |
fb5364bc | 25 | $hotkeys["m"] = "toggle_unread"; |
68ad3aea MF |
26 | $hotkeys["o"] = "toggle_expand"; |
27 | $hotkeys["(13)|enter"] = "toggle_expand"; | |
28 | $hotkeys["*(191)|?"] = "help_dialog"; | |
733ef11e MW |
29 | $hotkeys["(32)|space"] = "next_article"; |
30 | $hotkeys["(38)|up"] = "article_scroll_up"; | |
31 | $hotkeys["(40)|down"] = "article_scroll_down"; | |
3afc03b5 AD |
32 | |
33 | return $hotkeys; | |
106a3de9 | 34 | } |
3afc03b5 | 35 | |
106a3de9 AD |
36 | function api_version() { |
37 | return 2; | |
3afc03b5 | 38 | } |
106a3de9 | 39 | |
21ce7d9e | 40 | } |