Discussion:
Keystroke simulator
(too old to reply)
Mister Google
2005-03-29 12:01:06 UTC
Permalink
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/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Vernon Mauery
2005-03-29 16:07:19 UTC
Permalink
Post by Mister Google
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Dmitry Torokhov
2005-03-29 16:24:33 UTC
Permalink
Post by Vernon Mauery
Post by Mister Google
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 ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Pavel Machek
2005-03-29 18:51:25 UTC
Permalink
Post by Mister Google
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!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Loading...