[Greasemonkey] Simple keyboard shortcut script not working - Please Help!
streetbuck
nabble at email.streetbuck.net
Wed Jan 17 22:12:49 PST 2007
Hello,
I'm trying to make a simple greasemonkey script that captures when the [Esc]
key (Keycode 27, if i'm not mistaken) has been pressed, and executes a
function.
The script is as follows. It seems fairly straightforward to me, but for
some reason, the script is not doing anything. Can anyone tell me what I am
doing wrong?
Any help would be highly appreciated.. Thanks in advance!
// ==UserScript==
// @name MeeVee Keyboard Shortcuts
// @description Keyboard shortcuts for MeeVee
// @include http://www.meevee.com
// @include http://meevee.com
// ==/UserScript==
(function() {
function keyUp(event) {
if (!event) var event = window.event;
if (event.keyCode == "27".charCodeAt(0)) {
mvApp.guide.infowindow.close();
}
}
document.addEventListener("keyup", keyUp, false);
})();
--
View this message in context: http://www.nabble.com/Simple-keyboard-shortcut-script-not-working---Please-Help%21-tf3032461.html#a8425503
Sent from the MozDev - greasemonkey mailing list archive at Nabble.com.
More information about the Greasemonkey
mailing list