Re: Keystroke simulator

From: Dmitry Torokhov
Date: Tue Mar 29 2005 - 11:23:07 EST


On Tue, 29 Mar 2005 08:06:53 -0800, Vernon Mauery <vernon@xxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/