From: Andrew Dolgov Date: Sat, 17 May 2008 16:59:50 +0000 (+0100) Subject: hotkeys: parse keycode into keychar X-Git-Tag: 1.2.23-final~76 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c177f2e648ea659d194c1a646bbec75b07bde97d;p=tt-rss.git hotkeys: parse keycode into keychar --- diff --git a/tt-rss.js b/tt-rss.js index bcb8a99c..aea27409 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -931,6 +931,8 @@ function hotkey_handler(e) { keycode = e.which; } + keychar = String.fromCharCode(keycode); + if (keycode == 27) { // escape if (Element.visible("hotkey_help_overlay")) { Element.hide("hotkey_help_overlay"); @@ -982,7 +984,7 @@ function hotkey_handler(e) { return; } - if (keycode == 191) { // / + if (keycode == 191 || (is_opera() && keycode == 47)) { // / return displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat()); } @@ -1348,10 +1350,9 @@ function hotkey_handler(e) { } */ if (hotkey_prefix) { - debug("KP: PREFIX=" + hotkey_prefix + " CODE=" + keycode); - + debug("KP: PREFIX=" + hotkey_prefix + " CODE=" + keycode + " CHAR=" + keychar); } else { - debug("KP: CODE=" + keycode); + debug("KP: CODE=" + keycode + " CHAR=" + keychar); }