Sending Keystroke in DirectX game!

08/08/2015 03:16 WarOfRen#1
Hi guys!

I want to know if there's another way to send keystroke in DirectX game.

Im trying to make Auto Skills and Pots for @Ran World
but GetAsyncKeyState isnot working and Sendkey.send
SendInput
SendInput with the DIK keycodes
keybd_event

Im trying to use with directinput but i dont know how to send key with this.

Guys. can you givem e example of code sending key to DirectX Game..

-=Auto Pots=-
Skill 1 = 6
Skill 2 = 7
Skill 3 = 8
Skill 4 = 9
Skill 5 = 0

-=Auto Skill=-
Skill 1 = 1
Skill 2 = 2
Skill 3 = 3
Skill 4 = 4
Skill 5 = 5
Skill 6 = Q
Skill 7 = W
Skill 8 = E
Skill 9 = R
Skill 0 = T
08/08/2015 12:41 dready#2
Direct Input is fetching his data deep down on driver level.
The best approach is normaly hooking into DirectInput and push the keys into the buffer.
08/08/2015 22:09 Requi#3
GetAsyncKeyState() returns the current state of the key (being hold or pressed). You don't send keys with that.

You could use [Only registered and activated users can see links. Click Here To Register...]. But you have to run your application as administrator to send a keystroke to a directx window (at least if it's fullscreen afaik)