From 5b18c93622e97b9a251f3b85bdb088022fd5c0f3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 20:59:48 +0400 Subject: tweak hotkey map notation to allow stuff like shift-arrows --- js/tt-rss.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/tt-rss.js b/js/tt-rss.js index badfe8707..5ada64d31 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -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; -- cgit v1.2.3-54-g00ecf