Bernd Eichelsdorf said the following on 6/11/2006 2:28 AM:[color=blue]
> Robert schrieb:[color=green]
> > Bernd Eichelsdorf wrote:[color=darkred]
> >> Hi,
> >>
> >> I would like to add hotkeys to my webapp -
> >>
> >> Is that possible with javascript, if so, how?[/color]
> >
> > Yes, it is possible.
> > Take a look at
> >
http://www.w3.org/2002/09/tests/keys.html
> >
> > And you also may need to prevent the default action in an event handler
> >
> > if (event.preventDefault)
> > event.preventDefault();
> > else
> > event.returnValue = false; // IE[/color]
>
>
> Sorry, I don't understand.
> When I press F1, it tells me:
> Data keydown keypress keyup
> keyCode 67 0 ---
> but how can I do this myself, that
> I know if the user has pressed F1?[/color]
You check the keycode that triggered it and see if it is 67. If it is,
then you know they pressed F1.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/