Skip to content

Instantly share code, notes, and snippets.

@WishCow
Last active December 15, 2015 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WishCow/5218056 to your computer and use it in GitHub Desktop.
Save WishCow/5218056 to your computer and use it in GitHub Desktop.
Custom keyboard shortcuts for TinyTinyRSS
<?php
class MyKeys extends Plugin {
private $link;
private $host;
function about() {
return array(1.0,
"My custom keybindings",
"WishCow");
}
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
/**
* You can find the full list of shortcut names in includes/functions.php:1856,
* get_hotkeys_info
*/
function hook_hotkey_map($hotkeys) {
$myKeys = array(
"j" => "next_article",
"k" => "prev_article",
"l" => "next_feed",
"h" => "prev_feed",
"/" => "search_dialog",
"q" => "close_article",
"m" => "feed_catchup",
"M" => "catchup_all",
"u" => "toggle_unread",
"c t" => "edit_tags",
"o" => "open_in_new_window",
"J" => "article_scroll_down",
"K" => "article_scroll_up",
"w" => "toggle_widescreen",
"f" => "feed_subscribe",
"W" => "toggle_combined_mode",
"g a" => "goto_all",
"g f" => "goto_fresh",
":" => "goto_prefs",
"c l" => "create_label",
"c f" => "create_filter",
"s" => "collapse_sidebar",
"r" => "feed_reverse"
);
return array_merge($hotkeys, $myKeys);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment