Questions tagged [evdev]

Generic input event interface in Linux

evdev is a generic input event interface in the Linux kernel.

It generalizes raw input events from device drivers and makes them available through character devices in the /dev/input/ directory.

See here for further information.

124 questions
12
votes
0 answers

Python evdev equivalent for Windows 10

Is there a Windows-10 64 bit evdev equivalent that can be directly installed from the Anaconda command line? Example: [Anaconda2] C:\Users\User>conda install -c auto evdev_equivalent Attempts to install pyHook from the anaconda command line was…
gatorback
  • 1,351
  • 4
  • 19
  • 44
8
votes
1 answer

Simulate mouse motion on linux wayland

I receive xy data from my network and i would like to control the mouse position using linux on wayland. I've seen many source codes using X libs or X apps but it will not work on wayland. I also have a look on libinput and evedev but i don't find…
Erwan Douaille
  • 553
  • 1
  • 10
  • 31
7
votes
2 answers

Linux Evdev Poll Lag

I'm on a laptop with 2 connected keyboards (built-in and USB). I'm obtaining these connected keyboards with libudev and using epoll to poll them for input via the evdev interface: // Compile with $(gcc udev.c -ludev) #include #include…
7
votes
2 answers

Python evdev equivalent for OSX

I have written a python script that polls evdev for a HID barcode scanner (emulates a keyboard): the script works well on Linux platforms (Ubuntu). Is there an OS X Python equivalent for evdev that would allow minor porting of the existing python…
gatorback
  • 1,351
  • 4
  • 19
  • 44
6
votes
0 answers

Initializing libevdev in python so that a device can have multiple tools working

I have been working on a python based driver to bring back some functionality in some old tablets. I am initialising as follows dev.enable(libevdev.EV_REL.REL_X ) dev.enable(libevdev.EV_REL.REL_Y…
camelccc
  • 2,847
  • 8
  • 26
  • 52
6
votes
1 answer

X11 EvDev Touchscreen Driver : Disable Long-Press Right-click on desktop

I'm setting up a kiosk system that automatically loads a webpage in full screen on boot-up. Standard stuff. The problem is a hooked up an Acer touch screen which works fine with the evdev driver... but it works a little too well. If the user presses…
user761576
  • 481
  • 2
  • 6
  • 15
6
votes
1 answer

Linux input device events, how to retrieve initial state

I am using the gpio-keys device driver to handle some buttons in an embedded device running Linux. Applications in user space can just open /dev/input/eventX and read input events in a loop. My question is how to get the initial states of the…
Grodriguez
  • 21,501
  • 10
  • 63
  • 107
6
votes
1 answer

Python evdev detect device unplugged

I'm using the great "evdev" library to listen to a USB barcode reader input and I need to detect if the device suddenly gets unplugged/unresponsive because otherwise the python script reading the loop goes to 100% cpu usage on a single thread and…
Krisjanis Zvaigzne
  • 495
  • 1
  • 6
  • 7
5
votes
0 answers

Which device nodes are managed by udev, and which by evdev?

From the wiki for evdev: evdev (short for 'event device') is a generic input event interface in the Linux kernel and FreeBSD.[1] It generalizes raw input events from device drivers and makes them available through character devices in the…
rcheng
  • 63
  • 3
5
votes
0 answers

evdev - Terminate read loop

I am developing a small application on a Raspberry Pi. For this question I can boil it down to the usage of a rotary encoder. I found the usage of the dtoverlay the most convinient way for me. Hence, I use the evdev module in python3. My current…
5
votes
0 answers

Resolve Keycode to Scancode with Evdev with Certain Keyboard Layout

I am using the following code to print keycodes and scancodes for my currently plugged-in keyboard: import evdev device = evdev.InputDevice('/dev/input/event8') for event in device.read_loop(): if event.type == evdev.ecodes.EV_KEY: …
JJ Abrams
  • 365
  • 2
  • 11
5
votes
2 answers

Is there a way to get the evdev keycode from a string?

I'd like to read button mappings from a text file that contains data like this: DPAD_LEFT = 105 DPAD_RIGHT = 106 DPAD_UP = 103 DPAD_DOWN = 108 The right part is actually the evdev keycode (as defined in ). This is quite hard to read,…
Jan Holthuis
  • 149
  • 10
4
votes
0 answers

Simulating controller dpad button being held down with Python evdev

I'm trying to simulate holding down a DPad button on a controller using Python evdev. So far I've managed to successfully press a button like so: import os import time from evdev import uinput, ecodes as e, list_devices, InputDevice, ff dev =…
4
votes
0 answers

evdev cannot simulate touch input

I am trying to use evdev to simulate touch input. from evdev import UInput, AbsInfo, ecodes as e cap = { e.EV_KEY : [e.KEY_A, e.KEY_B], e.EV_ABS : [ (e.ABS_X, AbsInfo(value=0, min=0, max=255, fuzz=0,…
ovg
  • 1,486
  • 1
  • 18
  • 30
4
votes
1 answer

How to send a rumble effect to a device using python evdev

I like to send a rumble effect to a device using python evdev. This should be achieved with the upload_effect() function, which requires a buffer object as input. This is what capabilities() reveals: ('EV_FF', 21L): [ (['FF_EFFECT_MIN',…
Sven Rojek
  • 5,476
  • 2
  • 35
  • 57
1
2 3
8 9