EDN Admin
Well-known member
I have been working with simulating keystrokes based on controller input for simplification of game control because I cant change what buttons on the keyboard work with whatever actions in the game, I wanted to map the buttons to a controller instead since
I knew what actions I would map to what buttons...
I got the controller input working via XInput, it already detects all the buttons & such of the controller & is in a limited fashion working with sendkeys to my game, but going down a ladder for example is the down arrow key+z but I dont know how
to simulate the same in sendkeys or with any other method.
Also for directional arrows to move, I created a timer which sends the key repeatedly but its not the same effect, I move like centimeters at a time, in a jumpy fashion but when I hold down the actual key I move smoothly around like normal....
Is there a better way to emulate the keypresses so they can be as if they were possibly actually held down on the keyboard so using the controller mapping works for more than just jumping and using bombs or whatever in the game...
---I know there are 3rd party tools for mapping controls to keyboard actions but I havent found one by microsoft or someone I really trust, only 3rd party tools & really...I dont want to have to use them....I am doing this project rather than just
downloading a 3rd party tool already so I can try and sharpen up my programming skills...
Does anyone know anything which may help me with my un-smooth movement problem(only when trying to use it from the controller when mapped...currently uses sendkeys from a timer at the lowest possible interval...1) & holding a directional key down
while pressing the letter z...?
View the full article
I knew what actions I would map to what buttons...
I got the controller input working via XInput, it already detects all the buttons & such of the controller & is in a limited fashion working with sendkeys to my game, but going down a ladder for example is the down arrow key+z but I dont know how
to simulate the same in sendkeys or with any other method.
Also for directional arrows to move, I created a timer which sends the key repeatedly but its not the same effect, I move like centimeters at a time, in a jumpy fashion but when I hold down the actual key I move smoothly around like normal....
Is there a better way to emulate the keypresses so they can be as if they were possibly actually held down on the keyboard so using the controller mapping works for more than just jumping and using bombs or whatever in the game...
---I know there are 3rd party tools for mapping controls to keyboard actions but I havent found one by microsoft or someone I really trust, only 3rd party tools & really...I dont want to have to use them....I am doing this project rather than just
downloading a 3rd party tool already so I can try and sharpen up my programming skills...
Does anyone know anything which may help me with my un-smooth movement problem(only when trying to use it from the controller when mapped...currently uses sendkeys from a timer at the lowest possible interval...1) & holding a directional key down
while pressing the letter z...?
View the full article