summaryrefslogtreecommitdiff
path: root/plugins/swap_jk/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/swap_jk/init.php')
-rw-r--r--plugins/swap_jk/init.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/swap_jk/init.php b/plugins/swap_jk/init.php
new file mode 100644
index 000000000..34b09bd77
--- /dev/null
+++ b/plugins/swap_jk/init.php
@@ -0,0 +1,29 @@
+<?php
+class Swap_JK extends Plugin {
+
+ private $link;
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Swap j and k hotkeys (for vi brethren)",
+ "fox");
+ }
+
+ function init($host) {
+ $this->link = $host->get_link();
+ $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;
+
+ }
+}
+?>