diff options
Diffstat (limited to 'plugins/hotkeys_swap_jk/init.php')
-rw-r--r-- | plugins/hotkeys_swap_jk/init.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/hotkeys_swap_jk/init.php b/plugins/hotkeys_swap_jk/init.php new file mode 100644 index 000000000..b1e3dbe04 --- /dev/null +++ b/plugins/hotkeys_swap_jk/init.php @@ -0,0 +1,30 @@ +<?php +class Hotkeys_Swap_JK extends Plugin { + + private $host; + + function about() { + return array(1.0, + "Swap j and k hotkeys (for vi brethren)", + "fox"); + } + + function init($host) { + $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; + } + + function api_version() { + return 2; + } + +} |