Questions tagged [uinput]

uinput is a user level input subsystem. Basically it is a linux kernel module that allows to handle the input subsystem from user land

uinput is a user level input subsystem. Basically it is a kernel module that allows to handle the input subsystem from userspace. It can be used to create and to handle input devices from an application. It creates a character device in /dev/input directory. The device is a virtual interface, it doesn't belong to a physical device.

Once the uinput module is installed (via modprobe or insmod), a character device is created, named as /dev/input/uinput (or /dev/uinput on some systems). This device represents the interface between the application and the kernel input subsystem.

47 questions
8
votes
1 answer

Lib(s)uinput: creating joystick with more than one button

I can't find information, how create joystick with several buttons on it using uinput/suinput. Example on python using python-uinput: import uinput def main(): events = ( uinput.BTN_JOYSTICK, uinput.ABS_X + (0, 255, 0, 0), …
val is still with Monica
  • 1,257
  • 2
  • 15
  • 34
5
votes
1 answer

Is it efficient to use epoll with devices (/dev/event/...)?

I am working on a monothreaded process applet which creates a proxy virtual device (more precisely a virtual Xbox 360 pad); I do manage to create it with the uinput interface, I set it up properly and it works just fine. In order to feed commands to…
Emanuele
  • 1,265
  • 1
  • 10
  • 36
5
votes
1 answer

linux uinput: simple example?

I'm having some problems getting both sides of code using uinput working. Based on Getting started with uinput: the user level input subsystem[dead link; archived] I put together the following writer (minus error handling): int main(int ac, char…
Magnus
  • 4,444
  • 1
  • 30
  • 47
4
votes
2 answers

How to get name (path) of uinput created device

I have successfully set up a small program to create a uinput device which I plan to use to automate testing of an application receiving keyboard input events. I have followed both tutorials as found in this very nice answer. When my program creates…
Antonio Pérez
  • 6,078
  • 4
  • 27
  • 54
4
votes
1 answer

Uinput and Raspberry Pi

I tried to ask this question on the Raspberry Pi forums, but I have received no responses at all. I thought I might query the minds of the StackOverflow community that has been so helpful in the past. I'm writing a userspace driver for the…
PyroAVR
  • 667
  • 1
  • 6
  • 19
3
votes
0 answers

Failed to create a device file using `uinput` module. Python3 on Ubuntu for Windows

I have a python script that runs on python3.4 and uses the package keyboard to allow for keybinds; keyboard.add_hotkey("enter", self.listener.stop, suppress=True) keyboard.add_hotkey("shift+enter", self.listener.finish, suppress=True) When I run…
3
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,056
  • 1
  • 11
  • 25
2
votes
0 answers

uinput - mouse coordinates sync issue

I am writing a program to remotely control an arm based device which doesn't have X server running on it. I have a written a small utility to capture mouse events that are sent from the client side and emulate them on the device. For this purpose I…
Nithyesh
  • 95
  • 6
2
votes
1 answer

How to generate key strokes events with the Input Subsystem

I am writing a Key board emulator program in Linux, As a start I was able to render key strokes into X11 window but this is not working in virtual terminals and try out a different way. I referred to http://thiemonge.org/getting-started-with-uinput…
Dig The Code
  • 598
  • 1
  • 10
  • 29
1
vote
1 answer

Why my code is not able to create simple input device using uinput?

I am trying to learn using /dev/uinput in linux and copied simple code from kernel.org/doc/html/v4.12/input/uinput.html which is below: #include void emit(int fd, int type, int code, int val) { struct input_event ie; ie.type…
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…
S E
  • 2,987
  • 3
  • 19
  • 32
1
vote
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,056
  • 1
  • 11
  • 25
1
vote
0 answers

Python script stops working on new started applications (python-evdev)

I have been scratching my head for a couple of weeks now, I'm not well diversed in Linux so it's certanly something easy I've overlooked. In my system I got an arduino that sends data via I2C to my RaspberryPi. The PI looks at the data and then…
1
vote
0 answers

Using C to simulate a keystroke in linux with the uinput library

I've been using the following C code to try to simulate keystrokes on a CentOS 6.0 machine: #include #include #include #include #inlcude #include #include…
ashaquick
  • 51
  • 5
1
vote
1 answer

Can't get Kodi to accept keys emitted from python-uinput?

I'm emitting keys from a python script using python-uinput. Basic stuff such as up / down / enter / esc. As far as I can see this works fine on my desktop, in the terminal, and with the browser. But when I run Kodi, it doesn't seem to respond at…
digitalWestie
  • 2,349
  • 5
  • 25
  • 40
1
2 3 4