- emulating the keyboard with C
- Posted by jeff on July 12th, 2003
Hiya
I want to create a program in C that will cause the computer to
believe that that F5 key has been pressed, can this be done? this is
just part of a larger project
cheers
greg
- Posted by osmium on July 12th, 2003
jeff writes:
It should be possible, but it night be a real pain to get this up and
running. Modern OSes are getting increasingly fussy about what they allow a
mere user to do. Ideally, you can find someone who has done this, or almost
this, on your OS. Try doing a search on google advanced groups.
- Posted by Gianni Mariani on July 12th, 2003
jeff wrote:
This is OS dependant.
For Windoze, check out how VNC does it.
For X11, you can do this with the X-Keyboard extension.
I have no details myself but I'm sure you can dig in these and find out
how it's done.
Also, on Windows as well as X11 you can send "events". So if F5
normally translates to a refresh, there may be an event you can send to
a window that does the same thing.
As for OSX, I have no idea but I suspect the VNC people have done
somthing there as well.
G