You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
434 B
PHTML
31 lines
434 B
PHTML
12 years ago
|
<?php
|
||
5 years ago
|
class Hotkeys_Swap_JK extends Plugin {
|
||
12 years ago
|
|
||
|
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;
|
||
12 years ago
|
}
|
||
12 years ago
|
|
||
12 years ago
|
function api_version() {
|
||
|
return 2;
|
||
12 years ago
|
}
|
||
12 years ago
|
|
||
5 years ago
|
}
|