2012-12-28 06:46:53 +00:00
|
|
|
<?php
|
2020-05-31 04:45:41 +00:00
|
|
|
class Hotkeys_Swap_JK extends Plugin {
|
2012-12-28 06:46:53 +00:00
|
|
|
|
|
|
|
function about() {
|
2021-03-01 09:11:42 +00:00
|
|
|
return array(null,
|
2012-12-28 06:46:53 +00:00
|
|
|
"Swap j and k hotkeys (for vi brethren)",
|
|
|
|
"fox");
|
|
|
|
}
|
|
|
|
|
|
|
|
function init($host) {
|
|
|
|
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
|
|
|
|
}
|
|
|
|
|
|
|
|
function hook_hotkey_map($hotkeys) {
|
|
|
|
|
|
|
|
$hotkeys["j"] = "next_feed";
|
2021-05-20 17:32:00 +00:00
|
|
|
$hotkeys["J"] = "next_unread_feed";
|
2012-12-28 06:46:53 +00:00
|
|
|
$hotkeys["k"] = "prev_feed";
|
2021-05-20 17:32:00 +00:00
|
|
|
$hotkeys["K"] = "prev_unread_feed";
|
2012-12-28 06:46:53 +00:00
|
|
|
|
|
|
|
return $hotkeys;
|
2013-04-19 13:31:56 +00:00
|
|
|
}
|
2012-12-28 06:46:53 +00:00
|
|
|
|
2013-04-19 13:31:56 +00:00
|
|
|
function api_version() {
|
|
|
|
return 2;
|
2012-12-28 06:46:53 +00:00
|
|
|
}
|
2013-04-19 13:31:56 +00:00
|
|
|
|
2020-05-31 04:45:41 +00:00
|
|
|
}
|