directinput

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 tools, which means also the SDK's. I'd rather not take all of DirectX -- is DirectInput an...

DirectInput analogue joystick range

I use DirectInput to handle input devices, I enumerate devices and elements on each device. When using the analogue sticks on my game pad, they report values in the range 0-65535. Is this always the case for all types of absolute axis? If not: is there any way to find out the range of an DX8 input element's DIDEVICEOBJECTDATA::dwData (...

Post message for direct input

I want to simulate a mouse click in a video game that is minimized. The video game I am doing this for allows macroing like this, so it's all good. However, the game uses direct input so using PostMessage and SendMessage is not working. ...

Touchpad's absolute touch coordinates

Is it possible to read input directly from a Alps touchpad? I am trying to turn my touchpad into a cheap drawing tablet so I need to read the raw unprocessed x and y coordinates of where it was touched relative to the physical touchpad. So if I touch the bottom left corner of the touchpad, it should correspond to (0,0) etc. I am trying...

DirectX DirectInput C# measure audio input

Hello, C# 2008 SP3 I have developed a softphone and our client would like to have a feature that would test if the microphone is working. I was thinking to have a progress bar that would go up and down based on the nose level. I have done a bit of research on this. But I couldn't find any tutorials on directX DirectInput what would h...

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) != 0; } PollKeyboard(): LPDIRECTINPUTDEVICE8 di_keyboard; void PollKeyboard() { long result = di_keyboard->GetDeviceSt...

Joystick values not correct

Hi, I have a problem with respect of getting the state of a steering wheel (Logitech Steering Wheel). It looks like it doesn't perceive the throttle - rglSlider[0] is always 0, even if the acceleration paddle is pushed. The others buttons work fine. Actually only rgbButtons, lX and lY members of DIJOYSTATE2 struct are changing when I am...

Sending Key Strokes to Quake

I have been trying to write a code in VC++ for sending keys to quake game so that I can automatically move the bot. I have tried to use sendkeys functions but it only works for notepad. I have read earlier posts on this issue but none of them seems to help. It seems I have to use directinput api for this but since I never programmed in D...

sendinput to directinput(like games)

I'm trying to simulate keypress to my games that use direct input(I guess). I googled around and I found out the method SendIput(). It work fine if I try to send keypress to notepad.exe but nothing happend when I tried to games. I checked this site http://www.elitepvpers.de/forum/war-hacks-bots-cheats-exploits/170258-simulating-keystrok...

Should I use DirectInput or Windows message loop?

I'm working on a C++ DirectX 2D game and I need keyboard and mouse input. Wikipedia says: Microsoft recommends that new applications make use of the Windows message loop for keyboard and mouse input instead of DirectInput So how should I use it? I have a GameScreen class whice take care of the drawing and the updating(game logic), ...

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 deprecated, does the very fact the mouse is not even available to WINDOWS mean that you'...

GetRawInputData vs GetAsyncKeyState()

Well, I'm trying to avoid using the deprecated DirectInput. But I need, at each "frame" or "iteration" of the game to snatch ALL KEY STATES so that I can act accordingly. For example, if the player is down on the VK_RIGHT key then he will move just a smidgen right on that frame. The problem with WM_INPUT messages is they can appear an...

What is the difference between reading keyboard input asynchronously and using DirectInput?

DirectInput requires a lot of initialization functions and cetera to detect keyboard input, so what benefits are there to using it rather than the GetAsyncKeyState() function? ...

mdx DirectInput.CooperativeLevelFlags problem

I have this problem using MDX: i am trying to set up a keyboard device with the Foreground and Exclusive flags (up until now I let it to Background - which worked - and did the KeyUp / KeyDown events only when the app was focused, but with these settings I recon you can get some antivirus alerts because it could think that the app is a k...

Low level mouse hook and DirectX

I'm building an application which needs to filter some mouse clicks system-wide. That is, I need to make the system ignore some mouse button clicks at special occasions. I use low level mouse hook and SetWindowsHookEx to filter out these clicks. It works relatively well, except for WPF applications. I guess that's because these applicat...

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 by using DeviceInformation.ProductName/InstanceName to differentiate between controllers ...

Simulating Keyboard with SendInput API in DirectInput applications

Hello - I'm trying to simulate keyboard commands for a custom game controller application. Because I'll need to simulate commands in a DirectInput environment most of the usual methods don't work. I know that using a hook would work 100% but I'm trying to find an easier implementation. I've done quite a bit of searching and found tha...