Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: How do I capture the events of the keys F1 - F12


Message #1 by "Anders Hansen" <ahh@j...> on Wed, 14 Mar 2001 09:58:52
I am using Netscape 6

With the following example i can only capture events from keys that 
represent characters from ASCII.

exemple:
-------------------------------------------------------------------
document.onkeypress = clickHandler;

function clickHandler(e)
{
	var keyNumber = e.which;
	var key = String.fromCharCode( keyNumber );
}
-------------------------------------------------------------------

What shall I do if I want to capture events from the keys F1 -F12

  Return to Index