Link to home
Start Free TrialLog in
Avatar of djpriceAtl
djpriceAtl

asked on

How to send ctrl-F12 when an image icon is clicked on a webpage

I have phone system software installed on a workstation that I can highlight a phone number, then press Ctrl-F12 on the keyboard to dial.  Is there a way to send Ctrl-F12 when an icon is clicked on a web page that can bypass the need for the user to press Ctrl-F12?
Avatar of Big Monty
Big Monty
Flag of United States of America image

here's a good tutorial explaining how to capture key preses, more specifically the F1-F12 keys. Look at the test example on the bottom of the page to see it in action.

http://www.quirksmode.org/js/keys.html
Avatar of djpriceAtl
djpriceAtl

ASKER

I can capture no problem, its that I want to create the ctrl-F12 somehow.  I want to have an icon on the webpage that when clicked it will do the same thing as if the user pressed Ctrl-F12.  So it's not really a capture that is needed, it's how to simulate or create the Ctrl-F12 by a click on an icon without actually having to use the keyboard (this is especially important for the touch screen workstations).
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have never used jQuery so I am unfamilar with it.  I'm looking into finding examples of doing this now.  Do you know how to accomplish this task with jQuery in my .jsp?
Doing some more research, it looks like simulating a ctrl-f (1-12) event is not possible, as it could be a potential security risk (i wouldnt want a website to control whether or not i go into full screen, which would be ctrl-F11)

you may need to assign another key to do what you want. Either way, here's a thread that explains how to do what you want:

http://forum.jquery.com/topic/simulating-keypress-events