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.

52 questions
2
votes
2 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
  • 61
  • 6
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
  • 105
  • 8
2
votes
1 answer

Which KEY_ macro in Linux input.h matches the menu key?

I want to use uinput to emulate pressing the menu key just next to the right Alt key. I tried KEY_MENU and KEY_CONTEXT_MENU, but neither of them worked. The key in Win32 API is VK_APPS.
zyxwvu Shi
  • 21
  • 2
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

IOCTL error while closing an uinput device

We are testing a C code that creates/closes uinput devices, and have run into a strange issue. We have a basic api for interacting with the uinput library : #include #include #include #include #include…
DavidGL
  • 13
  • 3
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
1 answer

OSError: [Errno 19] Failed to open the uinput device: No such device

I am pretty new to raspberry and Linux. I am trying to run basic example of python library uinput on Raspbian (r Pi 3 B) with following code: import uinput device = uinput.Device([ uinput.BTN_LEFT, uinput.BTN_RIGHT, …
okram
  • 810
  • 3
  • 11
  • 17
1
vote
1 answer

Uinput gamepad events not working

How are you? I hope you can help me with something, I have a problem from Artix Linux, I want to connect my Wii Remote to use it as a Gamepad, it does not want to work because the uinput module does not want to interpret the events associated with…
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
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,647
  • 6
  • 28
  • 45
1
vote
0 answers

No output with uinput

When I run this example code from uinput: import uinput device = uinput.Device([ uinput.KEY_E, uinput.KEY_H, uinput.KEY_L, uinput.KEY_O, …
Mehdi Nellen
  • 8,486
  • 4
  • 33
  • 48
1
vote
1 answer

Convert Char to kernel Keycode (for uinput use)

I'm trying to do a virtual keyboard with uinput on Debian Stretch, that i could feed with strings, like "Toto !", and the keyboard would write this string. However, I'm stuck with the conversion from C char to keycodes handled by the keyboard. I'm…
Lescurel
  • 10,749
  • 16
  • 39
1
vote
1 answer

UINPUT device program in C for Ubuntu 14.04 does not work. Why? Part 2:

I am using Ubuntu 14.04, and I am setting up a virtual keyboard in c, which requires uinput to work. My program is supposed to send the key 'a' to terminal, as it would when I would press the 'a' key on the keyboard. Here's my source code: int…
Jara
  • 23
  • 3
1
vote
1 answer

UINPUT device program in C for Ubuntu 14.04 does not work. Why?

I am using Ubuntu 14.04, and I am setting up a virtual keyboard in c, which requires uinput to work. I had this root privilege problem: ls -l /dev/uinput crw-rw-rw- 1 root root 10, 223 Feb 25 11:11 /dev/uinput But I solved it by creating a new…
Jara
  • 23
  • 3
1
vote
1 answer

Touch event simulation using uinput in a linux based hmi screen is not working?

Below is the code using which i am trying to send the touch event to our hmi from user space . All the ioctl calls and write are checked explicitly to be successful but the event is not injected. The vendor id and product id device name is not…
glenn
  • 11
  • 4