Archived

This topic is now archived and is closed to further replies.

camcbri

using gamepad as mouse

Recommended Posts

hi guys! an idea just struck me that I wish a mouse had a lot more buttons... then i thought, why not use a gamepad (ie MS Sidewinder) to get my input in windows... Its not very cool to move a cursor with a d-pad, but hey, i want to learn some DirectInput! I thought I might create a background app that recognizes the 10 buttons on the gamepad and then reinterprets them as, say L mouse button/R mouse button/copy/paste/etc, and also use the dpad to move the cursor. Is this feasible? Has someone already done this so I could play with it? If anyone has any advice or resources for something simple like this, please let me know.. I''m a directx nooB, so I appreciate any assistance! - Chris

Share this post


Link to post
Share on other sites
I suppose you could track the cursor position manually and use SetCursorPos using your coords. The Only thing is that it would probably still read from the mouse as well. Not sure about handling mouse clicks but that should get you started -

If (LeftPressed) x--;
If (RightPressed) x++;
If (UpPressed) y--;
If (DownPressed) y++;

SetCursorPos(x,y);

Neil


WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites