Jump to content
  • Advertisement
Sign in to follow this  
Jazonxyz

Input Emulation

This topic is 3650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a joystick but my old games don´t suppourt it. I need to make a program to emulate the joystick. I know there are other programs for this but I want to make my own. How can I send keyboard messages from within my program. I can accuire the joystick input data but I don´t know how to send Keyboard data so that other programs pick it up. I´m using c++ and any library would be fine, preferably SDL and DirectInput 8

Share this post


Link to post
Share on other sites
Advertisement
http://msdn.microsoft.com/en-us/library/ms644950(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx

ie
SendMessage(HWND_BROADCAST, WM_KEYDOWN, VK_UP, 0);

Share this post


Link to post
Share on other sites
Sorry, I told you the wrong thing. I think you should be able to pass NULL for the first value and it will send the message to all windows, or you will have to get the window's handle somehow. There area few different functions. I have only ever done this stuff with hooks though, which are a bit different.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!