Is there a way to simulate a keystroke to a program, ie. have a program send
it something so that as far as it's concerned, say, the "P" key has been
pressed?
Thanks,
The Nomad.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Mister Google wrote:
> Is there a way to simulate a keystroke to a program, ie. have a program
> send it something so that as far as it's concerned, say, the "P" key has
> been pressed?
>
Look at the input system. Documentation/input/input-programming.txt has a great tutorial on how to do this.
--Vernon
On Tue, 29 Mar 2005 08:06:53 -0800, Vernon Mauery <[email protected]> wrote:
> Mister Google wrote:
> > Is there a way to simulate a keystroke to a program, ie. have a program
> > send it something so that as far as it's concerned, say, the "P" key has
> > been pressed?
> >
> Look at the input system. Documentation/input/input-programming.txt has a great tutorial on how to do this.
>
You probably will want to write a program using uinput driver to
inject events into input subsystem from userspace. Then the rest of
the world will not be able to recognize whether the data comes from
your program of from a real keyboard.
--
Dmitry
On ?t 29-03-05 11:53:32, Mister Google wrote:
> Is there a way to simulate a keystroke to a program, ie. have a program
> send it something so that as far as it's concerned, say, the "P" key has
> been pressed?
See /dev/input/uinput
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
Mister Google <[email protected]> wrote:
> Is there a way to simulate a keystroke to a program, ie. have a program send
> it something so that as far as it's concerned, say, the "P" key has been
> pressed?
Yes. That's what programs like telnetd do.
Look for man 4 pts.