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
1
vote
0 answers

Why can't I "cat file > /dev/input/event"?

I'm playing with Linux input events and devices. I wrote a simple toy C program that opens /dev/input/event* and writes Linux multi-touch events to the opened file. It worked well and I was able to mimic customer's swipe event. (I know I can use…
joybro
  • 205
  • 1
  • 12
1
vote
1 answer

Python function works fine except when imported

I've tried to distill this to the essentials. This code works fine. from evdev import InputDevice, ecodes dev = InputDevice('/dev/input/event2') # this is the joystick event file button = {304: 'A', 305: 'B', 307: 'X', 308: 'Y' } # Xbox360…
user52326
  • 11
  • 2
1
vote
1 answer

Python: get input from HID device outside the active window?

DESCRIPTION I use the Kivy framework and run a script in Python 3 that reads the input from a HID device. The device is a bar code scanner and simulates a keyboard. PROBLEM The script opens a popup and the bar reading procedure in background, both…
parovelb
  • 353
  • 4
  • 19
1
vote
0 answers

BLE device does not make new /dev/input/eventX when it reconnects, using Python Gatt Library

I am new to python gatt module, and i am having a problem with reconnections. Basically what I am trying to do is establish a connection with a Bluetooth Low Energy (BLE) device with the python gatt module( https://github.com/getsenic/gatt-python )…
D.Bozikis
  • 11
  • 2
1
vote
1 answer

What is the difference between /dev/input/eventX and /dev/input/jsX?

When I connect a gamepad on my Linux kernel v5.14 there are two new devices that show up: /dev/input/event23 /dev/input/js1 If I cat | xxd both device files provide gamepad event information. But event23 is much more verbose than js1. Also,…
Arjonais
  • 563
  • 2
  • 17
1
vote
1 answer

Exiting python program using evdev InputDevice results in a error

I'm experimenting with a controller as an input device using evdev. When I exit the program, I get an error message stating that the delete method (super) requires at least one argument. I have looked, but wer not able to find a solution to handle…
Pyroen
  • 11
  • 2
1
vote
1 answer

Setting absolute cursor position using python uvdev

I'm trying to simulate a graphics tablet in python, and as a result, I need to be able to set the absolute position of the cursor. I have tried python-evdev and python-libevdev, but I'm unable to set the absolute position. Wring values to the EV_ABS…
1
vote
1 answer

How does evdev determine whether or not to move the x11 cursor?

I'm starting to dig into the evdev api on linux for the purpose of playing around with uinput emulation. I noticed that between a joystick and a touch pad, there are different button/key event codes to distinguish between joypad button presses and…
user545199
1
vote
0 answers

QML application reconnect to touchscreen

I am running my qml application on a raspberry pi 3. For input I am using a touchscreen. Normally the touchscreen is working fine. But when I reboot the touchscreen, the qml application gives me the following error message: evdevtouch: Could not…
MHermann
  • 11
  • 2
1
vote
0 answers

Converting evdev inputs to understandable information

so i have successfully been able to track both mouse and keyboard events using the following code devices = map(InputDevice, ('/dev/input/event1', '/dev/input/event0')) devices = {dev.fd: dev for dev in devices} for dev in devices.values():…
1
vote
1 answer

Looking for a string in device capabilities; evdev; python

in evdev i'm trying to check to see if there is a mouse and keyboard plugged in and if so assign the device path to a variable to be used. This worked for a while as i just checked for the name Mouse or Keyboard in the device name by using this…
1
vote
1 answer

Faking an input device for testing purpose

What I want to do I'm writing a daemon which listen to the input devices for keys presses and send signals via D-Bus. The main goal is to manage audio volume and screen backlight level by requesting changes or informing about changes. I use libevdev…
Damien Flament
  • 1,465
  • 15
  • 27
1
vote
2 answers

Calibrating and configuring evdevtouch on embedded qt project

I have a Qt project running on a icoremx6solo with linux. I've setted up the graphics and run the code, but i can't handle touch inputs. Enabling the input logging with export QT_LOGGING_RULES="qt.qpa.input=true" i discovered that the coordinates…
1
vote
1 answer

eglfs: keyboard not grabbed

Raspbian running on RPi3B+, Qt5.9.2 cross-compiled, QWidget application. The keyboard input goes to the shell behind instead to my application. Following this document I set the following env…
Mark
  • 4,338
  • 7
  • 58
  • 120
1
vote
2 answers

Device input event using libevdev in C++

I am trying to get the touch event from Raspberry Pi Touchscreen. I made it work using FT5406 driver in python and evtest in C. However, I want to write code for this in C++. I notice libevdev is very useful in C, but when I call it in C++,…
Arlene Fu
  • 11
  • 5
1 2 3
8 9