View Full Version : can I activate a keyboard key using javascript

Mar 25th, 2007, 04:19 AM
Dear Colleagues:

I am in need of a javascript (or php) that will activate/trigger/simulate an event identical to pressing a keyboard key.

Specifically: I currently need to press CTRL + F12 to get a text2voice application to speak a word on a page. I do not want to press CTRL + F12 but rather use a onMouseOver event to 'activate/trigger/simulate' as if I pressed CTRL + F12

Is this possible? If yes, how?

Please know that I searched the net for a few hours before asking.

*** Please only answer if you know the answer, because my javascript knowledge is mainly on a cut/paste level. I can modify and read scripts so-so, but create new ones is beyond my skills.

Hope you can help. THANKS


Mar 25th, 2007, 05:55 AM
You need to call the function that you expect that key combination to call.

Mar 25th, 2007, 06:34 AM
I think its a java applet or a flash app hes trying to access. Not quite sure.

Mar 25th, 2007, 11:19 PM
Thanks for that. I will ask the application developer what function it is that I am to call. The application is a speech synthesizer that is supposed to start talking out a highlighted piece of text upon pressing CTRL + F12.

QUESTION: If I know what to 'call', how do I call it. Could you maybe copy/paste me an example code clipping of a 'call' line? Or is that easy to find on a search on google?

Thanks for your herlp Felgall,