Questions tagged [xinput]

XInput is an API that allows applications to receive input from the Xbox 360 Controller for Windows. Controller rumble effects and voice input and output are supported.

XInput, an API for "next generation" controllers, was introduced in December 2005 alongside the launch of the Xbox 360. This instruction set provided full support for Xbox 360 controllers in Windows XP SP1 and subsequent operating systems, and is described by Microsoft as being easier to program for and requiring less setup than DirectInput. XInput is compatible with DirectX version 9 and later.

Additional reading:

Wikipedia

Microsoft MSDN Introduction

142 questions
3
votes
1 answer

Using an Xbox One controller in Visual Studio?

I am trying to get input from an Xbox One controller, but I just cannot get it to work. I tried SharpDX, but I could not add "SharpDX.XInput" after installing SharpDX from NuGet. I also tried XInputDotNet, and added the reference to…
Betterjakers
  • 77
  • 2
  • 8
3
votes
1 answer

best way to work on / debug Xorg server modules

I want to work on an Xorg server module and I am wondering how I can reload the module at runtime. Also, maybe someone can give me some good tips about doing this (because I never have worked with Xorg server code before). Esp. I am running the…
Albert
  • 65,406
  • 61
  • 242
  • 386
3
votes
0 answers

Gnome double click on touchscreen

I can't get double clicking to work on a Surface Pro 3 (Fedora; Kernel 4.28; Gnome 3.18, Gtk3). Two fast consecutive taps are not converted to a 2button event in Gtk+. See the small Python program below, which works fine for a normal mouse or touch…
cass
  • 309
  • 1
  • 5
  • 14
3
votes
2 answers

C# - Can't resolve XInput namespace in DirectX SDK (November 2008)

I'm just starting to play around with directx and I've read a few articles on the internet that use XInput to interface with the Xbox controller. When I try to use it in my c# app, I can't seem to find the correct assembly to reference. From what I…
3
votes
2 answers

XInputGetKeyStroke returning ERROR_SUCCESS while controller is unplugged

XInputGetKeyStroke seems to return ERROR_SUCCESS when the specified controller is not plugged in, leaving the supplied XINPUT_KEYSTROKE struct uninitialized: XINPUT_KEYSTROKE xStroke; DWORD ret = XInputGetKeyStroke(0, 0, &xStroke); if (ret ==…
3
votes
1 answer

Controlling multiple pointers with Xlib or xinput in ubuntu/linux

I'm creating a system that uses multiple cursors (pointers) in multiple xsessions. My computer has multiple video cards in it for controlling different monitors. I want to have a different cursor on each screen and control each. Each monitor is a…
amustafa
  • 858
  • 1
  • 7
  • 17
2
votes
1 answer

Mouse emulation using an Xbox 360 controller

I am writing a small program to emulate the mouse with my Xbox 360 controller. I have successfully implemented movement of the cursor but am having difficulty with clicks. Here is a snippet of my code: while (msg.message != WM_QUIT) { if…
aligray
  • 2,812
  • 4
  • 26
  • 35
2
votes
0 answers

Keeping mouse movement the same at different display resolutions

I want the same mouse movement to produce the same pointer movement relative to cm/inches on the monitor, after changing the monitor resolution. I'm using X11 and have mouse acceleration enabled. After reducing my monitor resolution by a factor of 2…
Augustinas
  • 323
  • 2
  • 5
2
votes
1 answer

Is there a method to use Sendkeys with Xinput?

Im trying to find a way send inputs to XINPUT buttons for a controller that is already plugged in. So the one python repo (vjoy/pygame) wouldn't work since it "adds" a controller. Does anyone know if this exist? For a similar comparison I am able to…
2
votes
1 answer

XI_BadClass error in Xlib program trying to open a device (fails on the opening of the second device)

I am working on one "practical" program I need and it needs to be written in something like Xlib. One thing the program will do is read ALL key presses made by the user, to do this I must "open" the XDevices that are XI_KEYBOARDs. So I have a loop…
Victor Ocampo
  • 378
  • 2
  • 6
  • 15
2
votes
0 answers

How to consume XEvent when using Xinput 2?

I am looking at this example. I'm trying to write a program that will run in background and listen to all keyboard events. That program should be able to discard some of the keyboard input. In before mentioned example, key logger doesn't consume…
2
votes
1 answer

I need some help to understand USB Game Controllers (HID devices)

I apologize for the weird title but it is the best that I can come up with right now. So I have a project where I am building a HID device that will act as a game controller. I am thinking to emulate the controller so that it appears as an Xbox 360…
philm
  • 797
  • 1
  • 8
  • 29
2
votes
1 answer

C# SendInput() always returns 0 in Console Application

I have developed a simple Console application to poll an Xbox Controller using xinput. I would like to use the values obtained from one of the thumbsticks to move the mouse. I am able to get the x and y values from the thumbstick, but when I use…
Alexa Kirk
  • 152
  • 10
2
votes
0 answers

Send Xinput state to another Controller via sockets and pass it to a program

So in fact, i really love to play DS3 with friends just one game and everytime someone dies the controller passes to the next so typical couch gaming. But often we have no time to visit each other and so the only option would be online MP. Since i…
Yastanub
  • 1,227
  • 8
  • 19
2
votes
1 answer

How to simulate game controller key input?

I am currently working on a program that acts as a USB game controller but I am having trouble finding a way to simulate keypress and stick movement... I am hoping to work with python but anything will work.
1
2
3
9 10