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
3
votes
2 answers

Is there a way to check which event file in /dev/input/ is being used for keyboard input?

Basically, what I am trying to do is capture keyboard input from the user, using files in "/dev/input/". However, a problem I have come across is that the file which handles keyboard input is different on event files. What do I mean by this? Well,…
Reddington
  • 31
  • 1
3
votes
0 answers

Q: Write a string to HID device in Python?

I have an RFID reader with 2 antennas (ant1, ant2) attached to a RPi4 (raspbian) that behaves as a HID USB keyboard. I have managed to read its antennas oputput following these posts: How can I get a String from HID device in Python with…
parovelb
  • 353
  • 4
  • 19
3
votes
1 answer

Is there an evdev equivalent in windows

I want to make a program that decodes the input given by a barcode scanner, is there an equivalent to evedev for windows so I would be able to read the input given by this device
3
votes
1 answer

How to access the joysticks of a gamepad using python evdev?

I'm very new to evdev and am currently trying to use an xbox controller to control a small robot. I am successful with each of the buttons, but I can not seem to figure out how to get valid readings from the joysticks. This code only works for…
s.t
  • 31
  • 1
  • 3
3
votes
2 answers

Python, evdev, usb barcode reader: how to decode the input data

I have Datalogic Gryphon GFS4400 2D Barcode-scanner. I have put into Raspberry pi and it works as USB HID device. I can read barcodes and the output goes to default TTY. I want to create a serivce that handles the output when the barcode is read. I…
iiro
  • 3,132
  • 1
  • 19
  • 22
3
votes
0 answers

uinput and setting file permissions by chmod or rules

I'm writing a pseudo-chorded keyboard remapper here using evdev and uinput. I don't want to give my regular user the permission to read and write to /dev/input/event* and /dev/uinput so I have created a new user (hopr) with the sole purpose of…
athoren
  • 443
  • 4
  • 12
3
votes
1 answer

why does the file evdev in /usr/share/X11/xkb/rules not match with evdev.lst?

it seems that some options to setxkbmap which are listed in evdev.lst are not actually supported by the accompanying evdev file. For example ctrl:nocaps is supported but ctrl:swap_lalt_lctl is not, as evidenced by $ grep 'ctrl:nocaps'…
ajp
  • 1,723
  • 14
  • 22
2
votes
0 answers

Logistick G29 steering wheel rpm lights control through python

I have a g29 steering wheel with force feedback. I want to control force feedback and LED lights on the wheel by python script. i used python-evdev library to control the force-feedback of the wheel. But I am unable to find any support to control…
siddharth
  • 57
  • 7
2
votes
0 answers

How to prevent creation of evdev input node

In Debian Linux, I need to prevent udev from creating /dev/input/event* nodes for a specific USB HID device, while still allowing it to create the /dev/hidraw* node(s) I am aware that the event node can be "grabbed", preventing other processes from…
Colin Hahn
  • 21
  • 3
2
votes
1 answer

Capturing input device disables two-fingers-for-right-click capability

I have a convertible laptop for which there isn't great Linux support: the desktop environment is unable to detect when the device is in tablet mode, so the keyboard and touchpad are always active, which makes tablet mode almost useless. I've solved…
larsks
  • 277,717
  • 41
  • 399
  • 399
2
votes
0 answers

Is there a limit to how rapidly python evdev can write/inject to an input device?

I have a python program that uses evdev to simulate gamepad button presses. The device used is "cloned" from an xbox usb gamepad, by using ui = evdev.UInput.from_device(...) But for some reason it seems that the presses is sometimes…
DhP
  • 306
  • 1
  • 11
2
votes
0 answers

Python QR Code Reader. Exclusively listen to input() by keyboard

I would like my python script to listen only to the QR Code Reader which is detected as keyboard. I don't want the keyboard to write to the console or somewhere. Only the python script should listen to that keyboard on Linux. Is that possible? Is…
zer02
  • 3,963
  • 4
  • 31
  • 66
2
votes
2 answers

ImportError: cannot import name 'InputDevice' - Evdev

I installed evdev on my Raspberry Pi 3 B+ with sudo -H pip install evdev. The installation went normally and I ran python /usr/local/lib/python2.7/dist-packages/evdev/evtest.py to see if it was working. Everything was fine. The issue is that when…
dfarhi
  • 21
  • 6
2
votes
1 answer

Modern way to read gamepad input with C on Linux

I am interested in reading gamepad input, specifically a gamepad with the layout of a wired xbox 360 controller, with C on a linux machine. I understand that this can be done in a variety of ways, however I was wondering what is the modern method of…
2
votes
2 answers

python-evdev : reading axes X and Y of a gamepad simultaneously

With a little project in hands I thought it would be a good excuse to learn python. With the gamepad I have here (Logitech F310), the values of axis X and axis Y for the joysticks vary between 0-255, with 127 or 128 when they are "idle" at the…
Jim
  • 21
  • 1
  • 3
1
2
3
8 9