summaryrefslogtreecommitdiff
path: root/plugins/hotkeys_swap_jk/init.php
blob: a365b777f079e7fc66377e35c71a4faa412b60c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
class Hotkeys_Swap_JK extends Plugin {

	function about() {
		return array(null,
			"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";
		$hotkeys["J"] = "next_unread_feed";
		$hotkeys["k"] = "prev_feed";
		$hotkeys["K"] = "prev_unread_feed";

		return $hotkeys;
	}

	function api_version() {
		return 2;
	}

}