summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-01-22 13:00:20 +0400
committerAndrew Dolgov <[email protected]>2013-01-22 13:00:20 +0400
commit3fb401120af97da49c8d1c414e9e62fc29d80927 (patch)
tree0487ae364b5b82d71714ec8788938315c60b85f4 /js
parente5e2cf3b88a33594777a5487f400e9c93d6b82cd (diff)
support ctrl key hotkeys
Diffstat (limited to 'js')
-rw-r--r--js/tt-rss.js8
1 files changed, 3 insertions, 5 deletions
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;