How to send keys to apps. using DirectInput?
Posted on 2000-04-06
I have tried keybd_event & MapVirtualKey APIs and the SendKeys command but they didn't work.
I was trying to use the DirectX7a to send the keys, but I couldn't figurate out how to do it. All the docs I found about DirectInput were only for reading the keyboard (joystick, mouse, etc), not for sending keys.
How do I send a keystroke (for instance Enter) to an application that uses DirectInput to read the keyboard?
*** UPDATE ***
The other application using DirectInput is already active so I don't need to activate it with ActivateApp.
I'm already using DirectInput to read the Joystick and Keyboard, and it works fine. What I can't find is how to SEND keystrokes from my application to another application that also uses DirectInput to read the keyboard.