Skip to contentSkip to conversation

Keystroke simulator

DISCUSSION Mister Google 4 participants 4 messages Mar 29, 2005

lore
Share & tools
lore
#0 lore raw

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/

#1 lore raw
Quoted 4 lines · 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

#2 lore raw
Quoted 7 lines · Vernon Mauery
Quoted 4 lines · 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.

Signature · 1 line
Dmitry
#3 lore raw
In reply to Mister Google
Quoted 3 lines · 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

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!