View Full Version : simulating keyboard input
Shaol86
05-18-2003, 11:16 AM
I am looking for a way to write a program that will sit in the background and simulate a keyboard stroke for a different active program. I have only minimal coding skills.
joh6nn
05-19-2003, 04:38 AM
this would probably be the easiest thing for you to do:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthsendkeys.asp
alang
03-04-2005, 05:34 PM
Hi,
I am lookin for tutorial/website for simulating keyboard input in c.
I have no idea how to do this. I want to get input from the serial port and disguise it as input from the keyboard (ie. Left, Right, up, down). I want this fake input to execute in a game.
Any help would be appreciated,
Thanks,
Alan....
abhishek.in
03-06-2005, 04:01 AM
hi ,
u can simulate key strokes.
we hav two functions in vc...
BlockInput() and
SendInput()
BlockInput() prevents any keystroke or mouse event (either,as u wish), to get into the input queue.
u can use SendInput() to send a sequence of keyboard inputs, like key down, key up, key press. these input sequences will be stored in the input queue and will emulate actual keystroke when u make the blockinput free.
if u want i can qoute a code snippet i wrote.
u can refer msdn for reference.
alang
03-14-2005, 12:39 PM
Hi,
I need to know how to do this is regular c.
The input is for a game.
any help would be appreciated.
Dunna
03-15-2005, 01:36 PM
What language are you writing the game in? If you're writing in C/C++ you can use SendInput() or _keybd().
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.