]> git.wh0rd.org - tt-rss.git/blame - plugins/googlereaderkeys/init.php
googlereaderkeys: add u hotkey
[tt-rss.git] / plugins / googlereaderkeys / init.php
CommitLineData
3afc03b5
AD
1<?php
2class 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";
8add63ca 26 $hotkeys["u"] = "collapse_sidebar";
68ad3aea
MF
27 $hotkeys["o"] = "toggle_expand";
28 $hotkeys["(13)|enter"] = "toggle_expand";
29 $hotkeys["*(191)|?"] = "help_dialog";
733ef11e
MW
30 $hotkeys["(32)|space"] = "next_article";
31 $hotkeys["(38)|up"] = "article_scroll_up";
32 $hotkeys["(40)|down"] = "article_scroll_down";
3afc03b5
AD
33
34 return $hotkeys;
106a3de9 35 }
3afc03b5 36
106a3de9
AD
37 function api_version() {
38 return 2;
3afc03b5 39 }
106a3de9 40
21ce7d9e 41}