diff options
author | Andrew Dolgov <[email protected]> | 2012-12-28 10:46:53 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-28 10:46:53 +0400 |
commit | e218c5f56fa6b4cc31510071163791627d067e9d (patch) | |
tree | c94d12732a1e411506c2830d70452f4a484acf12 /plugins/swap_jk/swap_jk.php | |
parent | 43e706238a78633edb684c2e3b08260b1a91b149 (diff) |
main ui: action-based hotkey system, add swap_jk plugin
Diffstat (limited to 'plugins/swap_jk/swap_jk.php')
-rw-r--r-- | plugins/swap_jk/swap_jk.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/swap_jk/swap_jk.php b/plugins/swap_jk/swap_jk.php new file mode 100644 index 000000000..34b09bd77 --- /dev/null +++ b/plugins/swap_jk/swap_jk.php @@ -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; + + } +} +?> |