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

Flask page navigation from evdev event

from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/hello/') def hello(name): return render_template('page.html', name=name) if __name__ ==…
user1872384
  • 6,886
  • 11
  • 61
  • 103
2
votes
1 answer

How HID scancodes are mapped to evdev codes?

To send letter 'a', a HID device sends this scan code: 00 00 04 00 00 00 00 00. Value which corresponds to character 'a' is (found in /usr/share/X11/xkb/symbols/us). According to /usr/share/X11/xkb/keycodes/evdev, is mapped to by…
Igor Liferenko
  • 1,499
  • 1
  • 13
  • 28
2
votes
1 answer

XBox One Wireless control of Servo using Analogue Stick withevdev

I'm using Evdev to read the XBOX ONE inputs of A, B, X, Y to great success. However, I am battling to pick up the Analog Stick inputs. Can anyone help me with the Python code for this? I am trying to control a Servo. This is my code so far, it works…
2
votes
0 answers

Reading multitouch using libevdev

I'm trying to read raw multitouch data from my touchpad, though I'm not getting the results I expect. I started by identifying what my device ID was, using lsinput: /dev/input/event0 bustype : BUS_HOST vendor : 0x0 product : 0x5 version…
Thomas Kowalski
  • 1,995
  • 4
  • 20
  • 42
2
votes
1 answer

Can't write touch events to uinput using python-uinput

I am trying to write touch events. I am using a camera to track hands so I need two pointers and I need to display them. This is what I have tried but it does nothing: import uinput import time device = uinput.Device([ uinput.BTN_TOUCH, …
ovg
  • 1,486
  • 1
  • 18
  • 30
2
votes
0 answers

Where does the source code of evdev free the memory of "struct evdev" in linux version 3.4?

I'm tracing the evdev's memory in linux version 3.4. I find a memory is allocated in function "evdev_connect", and the allocated memory size is according to "struct evdev". The problem is I can't find where the memory is free? I think this memory…
LayaCCC
  • 415
  • 1
  • 5
  • 12
2
votes
1 answer

Virtual Keyboard (Linux/libevdev) - sending event

Trying to implement a virtual keyboard. The program sends a keystroke event in the 5 second cycle. Its working on PC (Ubuntu Linux). The problem is that nothing is displayed on Beaglebone Black/Raspberry Pi3. Plaftorm Beaglebone Black, Debian…
2
votes
1 answer

xorg touchscreen: absolute position ignored

I'm trying to use an EETI EXC7200 touchscreen with X (1.14.7). The touchscreen is recognized and events are processed. TS sends absolute coordinates and evdev driver is used (mode absolute). However when I move to the edge of the screen (and X or Y…
2
votes
1 answer

How can I install evdev on both Python 2.7 and Python 3.3?

I'm working with Python on a Raspberry Pi using the Raspian operating system. I installed evdev-0.4.7 and it works fine for Python 2.7. But when I try it for Python 3.3 I get an error. Apparently it only installed on Python 2.7. How can I install…
Daanii
  • 259
  • 2
  • 3
  • 12
2
votes
1 answer

Integrating HID access with evdev on linux with Python twisted

On a linux machine (Debian wheezy) I am trying to write an event-based server that does the following: Grab exclusive input to the input device (a special keyboard) to prevent the keystroke get into the usual event chain. Register for events in the…
GorillaPatch
  • 5,007
  • 1
  • 39
  • 56
2
votes
0 answers

How-to intercept keyboard input on linux with a custom daemon?

I am trying to build a daemon, preferable using Python, which is able to bind to a special keyboard attached to the Linux machine. The special keyboard is a barcode scanner but has an HID interface. I would like to avoid running X on the machine, so…
GorillaPatch
  • 5,007
  • 1
  • 39
  • 56
2
votes
1 answer

[Python][evdev] Get cursor position after mouse click

I have a problem for which I need to capture all events coming from my mouse. After browsing the web, I read about evdev module and gave it a try. I have now a script where I grab all events from my mouse, to prevent other interactions with other…
JCastejon
  • 53
  • 4
1
vote
0 answers

`libevdev` Key Remapping Stuck Key Bug

The following code attempts to remap the home key to 'b' by creating a uinput device from a real event device, intercepting the real device's events and sending them to uinput with the remapping. The problem is that if a key is held down when the…
yorklift
  • 31
  • 4
1
vote
1 answer

Reading and debouncing multiple controller keys with evdev

I have an 8bitdo NES controller that I have hooked up to a Raspberry Pi and am using it to interact with some various demos I'm working on. I'm trying to figure out a good way to grab multiple keypresses with evdev while debouncing so that a single…
erik
  • 3,810
  • 6
  • 32
  • 63
1
vote
1 answer

How to break out of read_loop() in python-evdev?

I am using read_loop() from python-evdev to capture the codes from an ir remote control. #!/usr/bin/env python3 from evdev import InputDevice dev = InputDevice('/dev/input/event0') for event in dev.read_loop(): print(event.value) How can I…
Eddy Sorngard
  • 149
  • 1
  • 12
1 2
3
8 9