gothfox/Tiny-Tiny-RSS — pull request #119 by dandersson (2013-04-02 07:17:42+00:00)
Title: Hook to add hotkey definition texts via plugins

This enables giving custom descriptive texts in the "Keyboard shortcuts help" window for hotkey actions defined by plugins.

Example implementation in "`extends Plugin`" plugin:

function init($host) {
$this->link = $host->get_link();
$this->host = $host;

$host->add_hook($host::HOOK_HOTKEY_INFO, $this);
}

function hook_hotkey_info($hotkeys) {
$hotkeys[__("Article")]["open_in_background_tab"] = __("Open in background tab (Chrome/Opera only)");

return $hotkeys;
}

Without this, hotkeys defined to trigger plugin defined actions won't even show up in the "Keyboard shortcuts help" window since they have no textual representation available.