How to capture function key presses

P

petedawn

guys,

i want to capture all the function key presses from F1 to F12. now i
want that when the user presses F1 from within the browser i should
display a alert window saying that they have pressed F1 instead of
displaying the browser help.

how can i implement this. thanks.
 
A

ASM

(e-mail address removed) a écrit :
i want to capture all the function key presses from F1 to F12. now i
want that when the user presses F1 from within the browser i should
display a alert window saying that they have pressed F1 instead of
displaying the browser help.

In which browser ?
On Windows, Mac, Linux ... ?

i.e : my Opera thinks I press F4 when Ctrl+4 are pressed :-(
i.e : on my Mac F9 to F16 are reserved for system
doubt you can catch them ?
i.e : on my Browser F1 is not for the Help
(not important it does nothing)
how can i implement this. thanks.

Implement what and why ? and for who ?

In my FF on my Mac =
F1 -> keyCode = 112
F2 -> keyCode = 113
....
F12 _> keyCode = 123

http://perso.wanadoo.fr/stephane.moriaux/truc/key_code.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top