1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-30 12:30:52 +02:00
ttrss/plugins/googlereaderkeys/init.php

39 lines
785 B
PHP
Raw Normal View History

2013-03-12 08:35:41 +01:00
<?php
class GoogleReaderKeys extends Plugin {
private $host;
function about() {
return array(1.0,
"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) {
$hotkeys["j"] = "next_article_noscroll";
$hotkeys["k"] = "prev_article_noscroll";
$hotkeys["*n"] = "next_feed";
$hotkeys["*p"] = "prev_feed";
$hotkeys["v"] = "open_in_new_window";
$hotkeys["r"] = "feed_refresh";
$hotkeys["m"] = "toggle_unread";
$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;
2013-04-19 15:31:56 +02:00
}
2013-03-12 08:35:41 +01:00
2013-04-19 15:31:56 +02:00
function api_version() {
return 2;
2013-03-12 08:35:41 +01:00
}
2013-04-19 15:31:56 +02:00
2013-03-12 08:35:41 +01:00
}
?>