Here's the situation:
(Code I Have):
<SCRIPT>
document.onKeyDown=handleKey;
document.onKeyUp=releaseKey;
function handleKey() {
// does something
}
function releaseKey() {
// does something
}
</SCRIPT>
<BODY>
<APPLET ---- onKeyDown="handleKey()" onKeyUp="releaseKey()">
</BODY>
My problem is that if I click on the document, it capture the keyEvent correctly, but when I click on the Java Applet, the keyEvent functions are never called. What is going on here? Isn't there a way to capture keyEvents for the entire page no matter what is on it?
(Code I Have):
<SCRIPT>
document.onKeyDown=handleKey;
document.onKeyUp=releaseKey;
function handleKey() {
// does something
}
function releaseKey() {
// does something
}
</SCRIPT>
<BODY>
<APPLET ---- onKeyDown="handleKey()" onKeyUp="releaseKey()">
</BODY>
My problem is that if I click on the document, it capture the keyEvent correctly, but when I click on the Java Applet, the keyEvent functions are never called. What is going on here? Isn't there a way to capture keyEvents for the entire page no matter what is on it?