1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-28 10:01:28 +00:00

main ui: action-based hotkey system, add swap_jk plugin

This commit is contained in:
Andrew Dolgov
2012-12-28 10:46:53 +04:00
parent 43e706238a
commit e218c5f56f
4 changed files with 192 additions and 437 deletions

View File

@@ -0,0 +1,29 @@
<?php
class Swap_JK extends Plugin {
private $link;
private $host;
function about() {
return array(1.0,
"Swap j and k hotkeys (for vi brethren)",
"fox");
}
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
function hook_hotkey_map($hotkeys) {
$hotkeys["j"] = "next_feed";
$hotkeys["k"] = "prev_feed";
return $hotkeys;
}
}
?>