add hotkey "\" to cancel current search

This commit is contained in:
Andrew Dolgov 2020-05-09 07:56:06 +03:00
parent c8243b03c9
commit 2558fcbe21
2 changed files with 6 additions and 1 deletions

View File

@ -1035,7 +1035,8 @@
"prev_article_noscroll" => __("Open previous article"),
"next_article_noexpand" => __("Move to next article (don't expand)"),
"prev_article_noexpand" => __("Move to previous article (don't expand)"),
"search_dialog" => __("Show search dialog")),
"search_dialog" => __("Show search dialog"),
"cancel_search" => __("Cancel active search")),
__("Article") => array(
"toggle_mark" => __("Toggle starred"),
"toggle_publ" => __("Toggle published"),
@ -1114,6 +1115,7 @@
"^(38)|Ctrl+Up" => "prev_article_noscroll",
"^(40)|Ctrl+Down" => "next_article_noscroll",
"/" => "search_dialog",
"\\" => "cancel_search",
"s" => "toggle_mark",
"S" => "toggle_publ",
"u" => "toggle_unread",

View File

@ -305,6 +305,9 @@ require(["dojo/_base/kernel",
this.hotkey_actions["search_dialog"] = function () {
Feeds.search();
};
this.hotkey_actions["cancel_search"] = function () {
Feeds.cancelSearch();
};
this.hotkey_actions["toggle_mark"] = function () {
Headlines.selectionToggleMarked();
};