I have a web application (Javascript) that captures keyboard input.
The code works independently -- in fact, I've tried several different variations/code snippets that other people have used/recommended. They all work, and are functionally equivalent.
But here's the clincher -- my whole program works fine -- keyboard and all -- once I run Venkman's Javascript debugger and then return to my program window!
It's as if Venkman's is doing something (setup, initialization) that my program isn't.
What could it be though?
Thanks,
Matthew
Here is the keyboard portion of my program:
function keyboard_handler(e) {
e = e || window.event;
var keyunicode = e.charCode || e.keyCode
var KeyID = e.keyCode || e.which;
vDebugPrint("Keyboard pressed: " + KeyID);
vDebugPrint("Unicode: " + keyunicode);
}
document.onkeydown = keyboard_handler;
The code works independently -- in fact, I've tried several different variations/code snippets that other people have used/recommended. They all work, and are functionally equivalent.
But here's the clincher -- my whole program works fine -- keyboard and all -- once I run Venkman's Javascript debugger and then return to my program window!
It's as if Venkman's is doing something (setup, initialization) that my program isn't.
What could it be though?
Thanks,
Matthew
Here is the keyboard portion of my program:
function keyboard_handler(e) {
e = e || window.event;
var keyunicode = e.charCode || e.keyCode
var KeyID = e.keyCode || e.which;
vDebugPrint("Keyboard pressed: " + KeyID);
vDebugPrint("Unicode: " + keyunicode);
}
document.onkeydown = keyboard_handler;