1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 16:15:55 +00:00

tweak hotkey map notation to allow stuff like shift-arrows

This commit is contained in:
Andrew Dolgov
2013-03-18 20:59:48 +04:00
parent 0ac2f52e14
commit 5b18c93622
4 changed files with 41 additions and 15 deletions

View File

@@ -45,6 +45,28 @@ class Backend extends Handler {
$sequence = substr($sequence,
strpos($sequence, "|")+1,
strlen($sequence));
} else {
$keys = explode(" ", $sequence);
for ($i = 0; $i < count($keys); $i++) {
if (strlen($keys[$i]) > 1) {
$tmp = '';
foreach (str_split($keys[$i]) as $c) {
switch ($c) {
case '*':
$tmp .= __('Shift') . '+';
break;
case '^':
$tmp .= __('Ctrl') . '+';
break;
default:
$tmp .= $c;
}
}
$keys[$i] = $tmp;
}
}
$sequence = join(" ", $keys);
}
print "<li>";