add hack to support arbitrary key descriptions for hotkeys
This commit is contained in:
parent
1b03e1deb6
commit
e5e2cf3b88
|
@ -44,6 +44,12 @@ class Backend extends Handler {
|
||||||
print "<li><h3>" . $section . "</h3></li>";
|
print "<li><h3>" . $section . "</h3></li>";
|
||||||
|
|
||||||
foreach ($hotkeys as $action => $description) {
|
foreach ($hotkeys as $action => $description) {
|
||||||
|
if (strpos($omap[$action], "|") !== FALSE) {
|
||||||
|
$omap[$action] = substr($omap[$action],
|
||||||
|
strpos($omap[$action], "|")+1,
|
||||||
|
strlen($omap[$action]));
|
||||||
|
}
|
||||||
|
|
||||||
print "<li>";
|
print "<li>";
|
||||||
print "<span class='hksequence'>" . $omap[$action] . "</span>";
|
print "<span class='hksequence'>" . $omap[$action] . "</span>";
|
||||||
print $description;
|
print $description;
|
||||||
|
|
|
@ -2035,9 +2035,9 @@
|
||||||
"j" => "prev_feed",
|
"j" => "prev_feed",
|
||||||
"n" => "next_article",
|
"n" => "next_article",
|
||||||
"p" => "prev_article",
|
"p" => "prev_article",
|
||||||
"(38)" => "prev_article",
|
"(38)|up" => "prev_article",
|
||||||
"(40)" => "next_article",
|
"(40)|down" => "next_article",
|
||||||
"(191)" => "search_dialog",
|
"(191)|/" => "search_dialog",
|
||||||
// "article" => array(
|
// "article" => array(
|
||||||
"s" => "toggle_mark",
|
"s" => "toggle_mark",
|
||||||
"S" => "toggle_publ",
|
"S" => "toggle_publ",
|
||||||
|
@ -2077,7 +2077,7 @@
|
||||||
"g t" => "goto_tagcloud",
|
"g t" => "goto_tagcloud",
|
||||||
"g P" => "goto_prefs",
|
"g P" => "goto_prefs",
|
||||||
// "other" => array(
|
// "other" => array(
|
||||||
"(9)" => "select_article_cursor", // tab
|
"(9)|tab" => "select_article_cursor", // tab
|
||||||
"c l" => "create_label",
|
"c l" => "create_label",
|
||||||
"c f" => "create_filter",
|
"c f" => "create_filter",
|
||||||
"c s" => "collapse_sidebar",
|
"c s" => "collapse_sidebar",
|
||||||
|
|
11
js/tt-rss.js
11
js/tt-rss.js
|
@ -366,6 +366,17 @@ function init_second_stage() {
|
||||||
if ('sessionStorage' in window && window['sessionStorage'] !== null)
|
if ('sessionStorage' in window && window['sessionStorage'] !== null)
|
||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
|
|
||||||
|
var hotkeys = getInitParam("hotkeys");
|
||||||
|
var tmp = [];
|
||||||
|
|
||||||
|
for (sequence in hotkeys[1]) {
|
||||||
|
filtered = sequence.replace(/\|.*$/, "");
|
||||||
|
tmp[filtered] = hotkeys[1][sequence];
|
||||||
|
}
|
||||||
|
|
||||||
|
hotkeys[1] = tmp;
|
||||||
|
setInitParam("hotkeys", hotkeys);
|
||||||
|
|
||||||
console.log("second stage ok");
|
console.log("second stage ok");
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue