]> git.wh0rd.org Git - tt-rss.git/commitdiff
Added alt and meta key handling to hotkeys
authorAndrew Herron <thespyder@programmer.net>
Tue, 2 Jul 2013 12:36:29 +0000 (22:36 +1000)
committerAndrew Herron <thespyder@programmer.net>
Tue, 2 Jul 2013 12:36:29 +0000 (22:36 +1000)
js/tt-rss.js

index c14c65f2797c939e8e09a12601131c151afbedfa..46e282351d595b95ca660e2b075836aa674c5c35 100644 (file)
@@ -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;