Questions tagged [directinput]
139 questions
2
votes
3 answers
Python Mouse Click For Game (Direct Input)
I searched a lot for simulate mouse clicks and movement for directx games. I found a good sources about keypressing but nothing for mouse. Actually there is good stackoverflow topic about key press with direct input (Simulate Python keypresses for…

sword1st
- 525
- 3
- 7
- 21
2
votes
2 answers
SlimDX DirectInput Initialization
I've recently swapped from MDX 2.0 to SlimDX, using Direct3D 11, but I'm struggling to implement keyboard and mouse controls.
In MDX you can use
keyb = new Microsoft.DirectX.DirectInput.Device(SystemGuid.Keyboard);
keyb.SetCooperativeLevel(this,…

Nick Udell
- 2,420
- 5
- 44
- 83
2
votes
1 answer
Finding out whether a DirectInput device supports XInput (with mingw/gcc)
I'm working on an input system, wrapping DirectInput and XInput. Currently XInput devices are enumerated twice, once as XInput and once as DirectInput (since they support both).
How can I find out if a given DirectInput device also supports XInput?…

Mr. Wonko
- 690
- 9
- 17
2
votes
1 answer
C# DirectInput - Determining a gamepad controller type
I'm trying to use a variety of gamepad controllers in my application using the DirectInput API. From what I can tell, the axes are mapped differently between devices.
Is there a common practice method for determining the controller type other than…

Munro
- 365
- 1
- 5
- 14
2
votes
2 answers
Send keys using directinput in Java?
I'm trying to send a few simple keys to a DirectX 11 game after a certain picture is shown on screen.
Problem is the proper keys isn't being sent through the robot class, VK_UP simply isn't being sent.
My thought was to send through directinput…

Kmonassar
- 91
- 7
2
votes
1 answer
Can't convert from virtual key code to unicode
I need to inject text into directinput applications. I'm using SendInput, but using virtual key codes doesn't work with directinput, so I need to use Unicode. Now, the keys I wan't to inject are registered on a file as virtual key codes, and i need…

Alex
- 45
- 1
- 7
2
votes
1 answer
Can I get DirectInput / XInput without the whole DirectX SDK?
I am developing an in-house app that would use XInput or DirectInput to read from the Xbox 360 controller. (I think it'll be the cheapest/easiest way to get multiple controls in the operator's hands.)
I will need to source-control all source and…

Toybuilder
- 11,153
- 5
- 28
- 33
2
votes
1 answer
Typedef warning and Syntax Error LPINPUT
I'm having trouble compiling some code that utilizes Direct Input 8. Everything else in my code works fine, but when the input code gets compiled this sequence of warnings and errors pops up.
1> Input.cpp
1>c:\program files (x86)\windows…

Lee Jacobs
- 1,692
- 3
- 12
- 21
2
votes
1 answer
Why does the mouse disappear in DISCL_EXCLUSIVE | DISCL_FOREGROUND mode?
When using DirectInput, why does the mouse cursor completely disappear when you use DISCL_EXCLUSIVE | DISCL_FOREGROUND as your cooperative level?
mouse->SetCooperativeLevel ( hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND ) ;
Even though DirectInput is…

bobobobo
- 64,917
- 62
- 258
- 363
2
votes
2 answers
using XInput, is it possible to get an image of the controller?
In my simple mind, it seems useful to ship a nice image of your joystick with an index of the button and axis locations on the image. Can such a thing be queried through the XInput or DirectInput APIs? Would it be driver-specific, and if so which…

Brannon
- 5,324
- 4
- 35
- 83
2
votes
1 answer
sendinput to directinput(like games)
I'm trying to simulate keypress to my games that use direct input.
I googled around and I found out the method SendIput().
It works fine if I try to send keypress to notepad.exe but nothing happend when I tried to games.
I checked this site, and I…

Sungwon Jeong
- 1,267
- 2
- 15
- 28
2
votes
0 answers
How do I emulate inputs of a connected joystick / gamepad device?
I don't even know if this is possible.
Basically I want to simulate gamepad inputs and I've already found some solutions here on stackoverflow. The common direction seems to be to create a virtual gamepad device that sends all the inputs.
What I…

unR
- 1,298
- 14
- 21
2
votes
2 answers
DirectInput 8 linking errors
I am trying to use DirectInput to control camera movement on a small 3D application for a school project. I am using C++ on VS2010.
Per this link, I needed to link dxguid.lib and dinput8.lib on my project properties. So, I added them.
This led to…

rubbyrubber
- 567
- 4
- 19
2
votes
2 answers
No keyboard input in Unity3D game builds
I'm using Unity3D and I'm having issues with the keyboard when I 'build' the project.
When I run the game within the Unity Editor, the input works fine. However, when I build the project and test it, I have no directional input whatsoever. The mouse…

cchomiak
- 21
- 1
- 3
2
votes
2 answers
Why doesn't my DirectX program recognize that I've released the escape key? (C++)
EDIT: After even more code modification, the error is still there, modified code shown:
KeyDown():
const int input_bit_num = 0x8000;
char keys[256];
bool KeyDown(int key)
{
return (keys[key] & input_bit_num) !=…
user98188