@KorMar 12.2004 — #I have not quite understand what do you mean by lock... Something like?:
[code=php] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <script> function capture(evt) { var c = document.layers ? evt.which : document.all ? event.keyCode : evt.keyCode; var s = String.fromCharCode(c) lock(s); } function lock(wh){ if(wh == 'Q'){return false} else{alert(wh)} } </script> </head>
<body onkeypress="return capture(this)"> if pressing Q nothing happens, else an alert will shou you the pressed key </body> </html> [/code]