2013-03-12 08:35:41 +01:00
|
|
|
<?php
|
|
|
|
class GoogleReaderKeys extends Plugin {
|
|
|
|
private $host;
|
|
|
|
|
|
|
|
function about() {
|
|
|
|
return array(1.0,
|
2013-03-16 12:06:59 +01:00
|
|
|
"Keyboard hotkeys emulate Google Reader",
|
2013-03-12 08:35:41 +01:00
|
|
|
"markwaters");
|
|
|
|
}
|
|
|
|
|
|
|
|
function init($host) {
|
|
|
|
$this->host = $host;
|
|
|
|
|
|
|
|
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
|
|
|
|
}
|
|
|
|
|
|
|
|
function hook_hotkey_map($hotkeys) {
|
|
|
|
|
2013-03-16 12:06:59 +01:00
|
|
|
$hotkeys["j"] = "next_article_noscroll";
|
|
|
|
$hotkeys["k"] = "prev_article_noscroll";
|
2013-03-18 17:59:48 +01:00
|
|
|
$hotkeys["*n"] = "next_feed";
|
|
|
|
$hotkeys["*p"] = "prev_feed";
|
2013-03-16 12:06:59 +01:00
|
|
|
$hotkeys["v"] = "open_in_new_window";
|
|
|
|
$hotkeys["r"] = "feed_refresh";
|
2013-03-22 13:40:39 +01:00
|
|
|
$hotkeys["m"] = "toggle_unread";
|
2013-03-16 12:06:59 +01:00
|
|
|
$hotkeys["(32)|space"] = "next_article";
|
|
|
|
$hotkeys["(38)|up"] = "article_scroll_up";
|
|
|
|
$hotkeys["(40)|down"] = "article_scroll_down";
|
2013-03-12 08:35:41 +01:00
|
|
|
|
|
|
|
return $hotkeys;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|