summaryrefslogtreecommitdiff
path: root/js/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-18 20:59:48 +0400
committerAndrew Dolgov <[email protected]>2013-03-18 20:59:48 +0400
commit5b18c93622e97b9a251f3b85bdb088022fd5c0f3 (patch)
tree900a8059e023a2646f712a0ebc9e69f3b5e40429 /js/tt-rss.js
parent0ac2f52e14373ab77b691af7ba517323c9b1a52c (diff)
tweak hotkey map notation to allow stuff like shift-arrows
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r--js/tt-rss.js6
1 files changed, 5 insertions, 1 deletions
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;