xinput

Controlling multiple pointers with Xlib or xinput in ubuntu/linux

廉价感情. 提交于 2021-02-10 23:25:50
问题 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 different session. I started using the xlib library in C to control the single cursor I have using the following command: XWarpPointer(display,None,window,0,0,0,0,x,y); This works perfectly for one cursor. Then I created a second cursor using xinput

Psychopy IO Gamepad

为君一笑 提交于 2020-05-17 06:32:06
问题 I am using Builder in standalone PsychoPy 1.80.07 in Windows. I'm trying to figure out how to create a Code Component to receive responses from a Logitech F310 Gamepad. Ideally, I would like to just use the triggers. I do not get any error code when I run the experiment (which is the Stroop keyboard IO demo with the IO keyboard code component code replaced with the below code). It seems to run fine, but it just shows the first trial and waits for a subject response as thought it isn't hearing

Second Cursor is not triggering a screen refresh

冷暖自知 提交于 2019-12-24 21:17:57
问题 I previously posted about controlling two separate cursors in two xsessions. (http://stackoverflow.com/questions/13714831/controlling-multiple-pointers-with-xlib-or-xinput-in-ubuntu-linux) That solution worked well. However, a odd thing occurs when I control the cursor. Instead of the cursor moving normally and the screen refreshing to adjust, the cursor is on top of a white box and when I move it the cursor leaves a trail and nothing refreshes. This only happens when I move the newly created

Controller support for Xbox one in Windows UWP

给你一囗甜甜゛ 提交于 2019-12-17 16:16:16
问题 I am wondering how I am supposed to handle input for UWP apps targeting Xbox One. I have noticed DirectInput, but I see two issues with it for my use cases: From MSDN, it only seems to support Xbox 360 controllers 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. DirectX and all of its API's (Direct2d, Direct3D, Xinput, etc...) are only supported on C / C++. That means even

Which event to listen for during XInput events

£可爱£侵袭症+ 提交于 2019-12-11 13:00:33
问题 Th Windows event loop typically looks like: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); }

Releasing all keys after disabling the keyboard in X11/Linux using xinput?

£可爱£侵袭症+ 提交于 2019-12-06 14:25:54
问题 On Linux when using X11/Xorg, when you use xinput to disable they keyboard (e.g. xinput set-prop $ID "Device Enabled" 0 ) the 'key-up' event is not send (because you've disabled the keyboard). This is noticable if you enter that command on the command line, it'll act like you're holding 'enter' down. This is because the command (which disables the keyboard) runs before you lift your finger off the enter key. This is discussed in this bug ( https://bugs.launchpad.net/ubuntu/+source/xserver

Releasing all keys after disabling the keyboard in X11/Linux using xinput?

两盒软妹~` 提交于 2019-12-04 18:23:20
On Linux when using X11/Xorg, when you use xinput to disable they keyboard (e.g. xinput set-prop $ID "Device Enabled" 0 ) the 'key-up' event is not send (because you've disabled the keyboard). This is noticable if you enter that command on the command line, it'll act like you're holding 'enter' down. This is because the command (which disables the keyboard) runs before you lift your finger off the enter key. This is discussed in this bug ( https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/724280 ) and this blog post ( http://blog.yjl.im/2010/12/using-xinput-to-disable

How to make a program that finds id's of xinput devices and sets xinput some settings

走远了吗. 提交于 2019-11-30 00:17:30
I have a G700 mouse connected to my computer. The problem with this mouse in Linux (Ubuntu) is that the sensitivity is very high. I also don't like mouse acceleration, so I've made a script that turns this off. The script looks like this #!/bin/bash # This script removes mouse acceleration, and lowers pointer speed # Suitable for gaming mice, I use the Logitech G700. # More info: http://www.x.org/wiki/Development/Documentation/PointerAcceleration/ xinput set-prop 11 'Device Accel Profile' -1 xinput set-prop 11 'Device Accel Constant Deceleration' 2.5 xinput set-prop 11 'Device Accel Velocity

Simulate XBox Controller Input with Python

只谈情不闲聊 提交于 2019-11-29 03:07:52
问题 I want my python programm to simulate an XBox controller input. Both analog thumb sticks and the on/off buttons if possible. I found topics about simulating Keyboard input with ctypes in python, for example here: Python simulate keydown Is it possible to simulate it similar to an "keydown" on a normal keyboard or mouse? 回答1: In case someone with the same problems will find this thread: I solved the issue with vJoy, pyVJoy and x360ce. vJoy provides an SDK and driver to simulate input devices.

How to make a program that finds id's of xinput devices and sets xinput some settings

ぐ巨炮叔叔 提交于 2019-11-28 20:26:02
问题 I have a G700 mouse connected to my computer. The problem with this mouse in Linux (Ubuntu) is that the sensitivity is very high. I also don't like mouse acceleration, so I've made a script that turns this off. The script looks like this #!/bin/bash # This script removes mouse acceleration, and lowers pointer speed # Suitable for gaming mice, I use the Logitech G700. # More info: http://www.x.org/wiki/Development/Documentation/PointerAcceleration/ xinput set-prop 11 'Device Accel Profile' -1