Click to See Complete Forum and Search --> : triggering keyboard input within the whole document
webrunner
03-28-2003, 03:27 PM
I am having trouble building an event handler that is will be invoked any time some one presses a particualr key. i know the correct key codes but I am pretty lost as to how to do it. I can't find examples that clearly illustrate what i am to do. I am using ie 6.0. I want to make it so a javascript function is triggered when a user inputs the letter 0 anytime while browsing the document. this may sounds silly to some but I am pretty lost on how this works.
angrytuna
03-28-2003, 03:49 PM
Try this (http://developer.irt.org/script/event.htm)[irt.org]. In particular, look for FAQ 848
~at
webrunner
03-28-2003, 04:01 PM
thanks It worked, I knew it was something that I may have missed. I feel kind of bad, Thanks for the help though.
webrunner
03-28-2003, 08:40 PM
Just out of curiousity anybody know the codes for capturing the function keys like F2. I know some of them are in use, but it might help me to use function keys. I am looking on the web but so far no dice. I set up window.event.keyCode and have it write out the results when I press the F2 key but I don't get any key code.
webrunner
03-28-2003, 09:01 PM
This is frustrating I have a scan codes for example F2 is 113 and it just won't work on onKeyPress in the body tag. If anyone could help me it would be appreciated.
nutcracker
01-05-2007, 03:00 AM
I'm having a similar problem. I need keycodes for the down arrow key. I have a matrix of text boxes and I want the cursor to move vertically downwards when I press the down arrow key. Please help.
Thanks,
Tony.