agriget/plugins/mykeys/init.php

35 lines
692 B
PHP
Raw Permalink Normal View History

2021-11-01 23:40:09 +08:00
<?php
/*
* Add this file to a directory named `mykeys` in the plugin directory. Reload
* TT-RSS and enable the plugin via Preferences→Plugins.
*/
class MyKeys extends Plugin {
private $host;
function about() {
return [
1.1,
'Personal keyboard configuration',
'dandersson',
false];
}
function api_version() {
return 2;
}
function init($host) {
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
function hook_hotkey_map($hotkeys) {
$hotkeys['A'] = 'mark_all_as_read';
$hotkeys['r'] = 'feed_refresh';
return $hotkeys;
}
}