From 3fb401120af97da49c8d1c414e9e62fc29d80927 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 22 Jan 2013 13:00:20 +0400 Subject: support ctrl key hotkeys --- js/tt-rss.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index 13181c421..b97c052c1 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -645,11 +645,8 @@ function hotkey_handler(e) { var cmdline = $('cmdline'); - try { - shift_key = e.shiftKey; - } catch (e) { - - } + shift_key = e.shiftKey; + ctrl_key = e.ctrlKey; if (window.event) { keycode = window.event.keyCode; @@ -687,6 +684,7 @@ function hotkey_handler(e) { Element.hide(cmdline); var hotkey = keychar.search(/[a-zA-Z0-9]/) != -1 ? keychar : "(" + keycode + ")"; + if (ctrl_key) hotkey = "^" + hotkey; hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey; hotkey_prefix = false; -- cgit v1.2.3