2012-12-28 07:46:53 +01:00
|
|
|
<?php
|
|
|
|
class 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;
|
2013-04-19 15:31:56 +02:00
|
|
|
}
|
2012-12-28 07:46:53 +01:00
|
|
|
|
2013-04-19 15:31:56 +02:00
|
|
|
function api_version() {
|
|
|
|
return 2;
|
2012-12-28 07:46:53 +01:00
|
|
|
}
|
2013-04-19 15:31:56 +02:00
|
|
|
|
2017-04-26 19:57:36 +02:00
|
|
|
}
|