]> git.wh0rd.org - tt-rss.git/commitdiff
support ctrl key hotkeys
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 22 Jan 2013 09:00:20 +0000 (13:00 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 22 Jan 2013 09:00:20 +0000 (13:00 +0400)
include/functions.php
js/tt-rss.js

index ac3a8861e0cc33c633ca60f9d330e118dc3b2e3e..f3c05fecbf58134ece6e2f2c3ec1bd756e824e5f 100644 (file)
                                "g t" => "goto_tagcloud",
                                "g P" => "goto_prefs",
 //                     "other" => array(
-                               "(9)|tab" => "select_article_cursor", // tab
+                               "(9)|Tab" => "select_article_cursor", // tab
                                "c l" => "create_label",
                                "c f" => "create_filter",
                                "c s" => "collapse_sidebar",
+                               "^(191)|Ctrl+/" => "help_dialog",
                        );
 
                global $pluginhost;
index 13181c4212c5de1bad21b50162d631a4edae2094..b97c052c1a0f6f82acddde86e582620ee7c72452 100644 (file)
@@ -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;