[thelist] Detecting various Keystrokes

Keith cache at dowebscentral.com
Fri Jan 3 16:56:02 CST 2003


At 03:45 PM Friday 1/3/2003, you wrote:
>Rob
>
>>I know you can detect various key strokes in VB like Shift+Ctl+F4 and the
>>program will blow up (It won't). Can you detect similar key stroke actions
>>on the Web? Whether it be JavaScript, PHP, CGI, whatever...
>
>This little gem wrx w/javascript and will show you the accumulated key
>strokes as you type them.

Well, it would wrk better if I hadn't sent it as the full html page :-)
Sorry.........

IE=document.all;
NN=document.layers;
kys="";
if (NN){document.captureEvents(Event.KEYPRESS)}
document.onkeypress=katch
function katch(e){
if (NN){kys+=e.which}
if (IE){kys+=event.keyCode}
document.forms[0].elements[0].value=kys
}

<form><input></form>



Keith
====================
cache at dowebscentral.com




More information about the thelist mailing list