1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:25: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

@@ -556,7 +556,7 @@ function hotkey_handler(e) {
if (keycode == 16) return; // ignore lone shift
if (keycode == 17) return; // ignore lone ctrl
if (!shift_key) keychar = keychar.toLowerCase();
keychar = keychar.toLowerCase();
var hotkeys = getInitParam("hotkeys");
@@ -577,7 +577,11 @@ function hotkey_handler(e) {
Element.hide(cmdline);
var hotkey = keychar.search(/[a-zA-Z0-9]/) != -1 ? keychar : "(" + keycode + ")";
// ensure ^*char notation
if (shift_key) hotkey = "*" + hotkey;
if (ctrl_key) hotkey = "^" + hotkey;
hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey;
hotkey_prefix = false;