From c177f2e648ea659d194c1a646bbec75b07bde97d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 17 May 2008 17:59:50 +0100 Subject: [PATCH] hotkeys: parse keycode into keychar --- tt-rss.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tt-rss.js b/tt-rss.js index bcb8a99c2..aea274095 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); }