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
0
votes
0 answers

Why is evdev not matching the joypad keys I expect on event capture?

I have these joypads: And they work well (e.g. when interacting with RetroArch, in my Raspberry OS [Bullseye], and when interacting with a sample Godot 4.0 interface I created, this time in my Ubuntu 22.04). BUT then I try the evdev library in…
Luis Masuelli
  • 12,079
  • 10
  • 49
  • 87
0
votes
0 answers

xinput & libinput calibration & configuration of a Fujitsu resistive touchscreen (void linux)

So here's the situation: I have been running Void on a Toughbook CF-31 from about 2011 that has treated me quite well. It was running Win10 before I put Linux on it and the touchscreen worked with that OS. However, as soon as I installed Void the…
nau5ea
  • 13
  • 4
0
votes
1 answer

Python evdev [Error 16] Device or resource busy

I connected 2D barcode scanner with Raspberry Pi 4 Model B and tried to scan few codes. on using evdev library I got the output successfully. But the issue is after 3 continues scans it's throwing me an exception saying "[Error 16] Device or…
0
votes
0 answers

Linux ioctl() with a virtual device

I want to create a virtual device on my Linux system. I am using libevdev. The first thing I do is to mirror an existing device. The new virtual device with all the same event types, event codes etc. is created: libevdev* dev = nullptr; int fd =…
Ragdoll Car
  • 141
  • 6
0
votes
0 answers

Asking about EV DEV USB Barcode scanner

I following code from piddlerintheroot but found out that print " No Barcode device found" My device specification USB Barcode PANDA Here is my code from evdev import InputDevice, ecodes, list_devices, categorize import signal,…
0
votes
0 answers

Why is this input device read loop slowing down over time?

Background: I wrote a python script that uses evdev to read from the gamepad on a Steam Deck and use it to send keypresses to a game. From a functionality standpoint, it does everything perfectly. The Problem: The script slows down over time: after…
0
votes
1 answer

creating a udev rule to get data from a symlink for a usb barcode scanner(ls2208)

I have this udev rule which creates the symlink SUBSYSTEM=="usb", ACTION=="add", ATTRS{product}=="Symbol Bar Code Scanner", SYMLINK+="scanner1" but when i cat the symlink like so cat /dev/scanner1 I get this File: /dev/scanner1 │ Size: 0…
0
votes
1 answer

why are events duplicated when polling and reading /dev/input/event file descriptors with or without libevdev

when polling /dev/input/event file descriptors, i am seeing events duplicated, why is that? this happens when using just read, but also seeing this when using libevdev here is code i was playing with using only poll/read while(true) { …
tbny
  • 11
  • 3
0
votes
1 answer

How to get make to find libevdev objects?

I am trying to solve this bug because the author is no longer responding to bug reports: https://github.com/PeterCxy/evdev-right-click-emulation/issues/14 It is essentially the same as the two bugs reported…
0
votes
0 answers

How to create a temporary UInputDevice in linux from scratch?

I am aware that I can use let f = File::open("/dev/input/event0").unwrap(); let dummy = evdev_rs::UInputDevice::create_from_device(&Device::new_from_fd(f).unwrap()).unwrap(); But how would I create a dummy device that would be able to do all…
0
votes
1 answer

Python evdev loop not reacting to keypresses

I am trying to work with the python evdev module (Python3 Interpreter / Linuxmint 20.1). I tried to run the example code of the documentation (https://python-evdev.readthedocs.io/en/latest/tutorial.html#reading-events): >>> from evdev import…
neo
  • 11
  • 1
0
votes
0 answers

Can't install evdev on python 3.9

I'm trying to make a program in which I need to emulate a key press from a gamepad, I looked for it a lot but the only module I found is python-evdev. I have tried to install it through the use of pip install evdev but there isn't any matching…
M4tt3.exe
  • 3
  • 4
0
votes
1 answer

Best way to get multiple variable values or information from a function

I am fairly new to python and am attempting to create a custom module that I can import for my raspberry pi using evdev (not that important). My problem is I need a good way to know when a given button is pressed down preferably using True/False. If…
Joe
  • 1
0
votes
1 answer

Why does Python try-except cause slowdown?

I have written a simple application for my RaspberryPi in python3. My rpi has a fresh install and I have completed all updates prior to starting development. This application is a sports scoreboard that displays on an LED matrix and utilizes a…
Erik U
  • 1
  • 1
0
votes
1 answer

Does Python evdev library have an event specific grab or passthrough?

A python evdev device has a .grab() function that prevents other processes from getting input events on the device. Is there any way to limit this to specific events from a device? For my example, if I .grab() a pen input device that has pressure…
Mimerr
  • 390
  • 1
  • 5
  • 14
1 2 3
8 9