   Faking keyboard input do DirectInput will see it
  I'm attempting to map my XBOX 360 controller to my keyboard so I can use it for games.  I'm using C# and Windows XP, but if C++ is the only choice, I'll use that.So far I've tried SendKeys and keybd_event in both C++ and C#, but neither are low level enough for DirectInput to pick up on it.  They work fine for general windows apps, but not DirectInput.  Anyone know how to do this?Thanks.-Nick   
  I'm afraid to tell you that you can't do what you want to do (easily, anyway). DirectInput directly interfaces with the hardware (which is why it's called DirectX.)The only real way to do this is to write your own directinput dll that acts as a proxy to the real directinput, and plop that into what ever game directory you're using that uses Directinput. Then you catch everything that the game queries, and feed it your custom info you query (for instance, if the 360 controller goes up, tell the game that DIK_UP/DIK_W or whatnot was pressed by modifying the data that it polled).That's really the only way to do what you want to do. DirectInput bypasses all Winapi when communicatring with input devices.   ;  Another alternative to the only way of creating a proxy DirectInput, is to grab a utility like this one:Total Game Controlhttp://www.digitaltransforms.com/I perosnally haven't tried it, but it looks convincing.- Phil   ;Quote:Original post by nickwintersSo far I've tried SendKeys and keybd_event in both C++ and C#, but neither are low level enough for DirectInput to pick up on it.I'm 99% sure that you're wrong about keybd_event not being low-level enough for DirectInput to pick up on it.  That method pushes the keyboard event directly to the driver.  That's how we send keyboard events for automated testing, which DI picks up with no problem.;  Well, I was unable to get keybd_event to work with Direct Input.  I've also tried digital transform's....  It works with DirectInput, but doesn't work with the game I'm specifically working with.  The game is Maple Story, and it seems to have the most paranoid security measures ever (I can't even start a new process after I start running Maple).However, I know it is possible, as my friend uses the EMS Converter with his PS2 controller.   