From d999bc3eb2e0000aad7f92f73ed26938c7a83519 Mon Sep 17 00:00:00 2001 From: Andrew Herron Date: Tue, 2 Jul 2013 22:29:19 +1000 Subject: [PATCH 1/2] prevent accidental ctrl_key global --- js/tt-rss.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/tt-rss.js b/js/tt-rss.js index a1d7d641..c14c65f2 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -847,6 +847,7 @@ function hotkey_handler(e) { var keycode = false; var shift_key = false; + var ctrl_key = false; var cmdline = $('cmdline'); From c65bd1027ab46848493973da0515640a93815d27 Mon Sep 17 00:00:00 2001 From: Andrew Herron Date: Tue, 2 Jul 2013 22:36:29 +1000 Subject: [PATCH 2/2] Added alt and meta key handling to hotkeys --- js/tt-rss.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/tt-rss.js b/js/tt-rss.js index c14c65f2..46e28235 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -848,11 +848,15 @@ function hotkey_handler(e) { var keycode = false; var shift_key = false; var ctrl_key = false; + var alt_key = false; + var meta_key = false; var cmdline = $('cmdline'); shift_key = e.shiftKey; ctrl_key = e.ctrlKey; + alt_key = e.altKey; + meta_key = e.metaKey; if (window.event) { keycode = window.event.keyCode; @@ -894,6 +898,8 @@ function hotkey_handler(e) { // ensure ^*char notation if (shift_key) hotkey = "*" + hotkey; if (ctrl_key) hotkey = "^" + hotkey; + if (alt_key) hotkey = "+" + hotkey; + if (meta_key) hotkey = "%" + hotkey; hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey; hotkey_prefix = false;