From 12116f6abb2d322fb1a4d4f27683561a3b331a41 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 21 May 2021 13:28:50 +0300 Subject: split into separate repo --- init.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 init.php (limited to 'init.php') diff --git a/init.php b/init.php new file mode 100644 index 0000000..9361584 --- /dev/null +++ b/init.php @@ -0,0 +1,40 @@ +host = $host; + + $host->add_hook($host::HOOK_HOTKEY_MAP, $this); + } + + function hook_hotkey_map($hotkeys) { + + $hotkeys["j"] = "next_article_noscroll"; + $hotkeys["k"] = "prev_article_noscroll"; + $hotkeys["N"] = "next_feed"; + $hotkeys["P"] = "prev_feed"; + $hotkeys["v"] = "open_in_new_window"; + $hotkeys["r"] = "feed_refresh"; + $hotkeys["m"] = "toggle_unread"; + $hotkeys["o"] = "toggle_expand"; + $hotkeys["\r|Enter"] = "toggle_expand"; + $hotkeys["?"] = "help_dialog"; + $hotkeys[" |Space"] = "next_article"; + $hotkeys["(38)|Up"] = "article_scroll_up"; + $hotkeys["(40)|Down"] = "article_scroll_down"; + + return $hotkeys; + } + + function api_version() { + return 2; + } + +} -- cgit v1.2.3