https://github.com/ckath/mergeinputs
extremely basic program to merge keyboard devices on linux
https://github.com/ckath/mergeinputs
combine keyboard linux merge uinput
Last synced: about 1 month ago
JSON representation
extremely basic program to merge keyboard devices on linux
- Host: GitHub
- URL: https://github.com/ckath/mergeinputs
- Owner: Ckath
- License: mit
- Created: 2020-05-24T23:39:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T17:36:44.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T21:22:09.264Z (about 2 months ago)
- Topics: combine, keyboard, linux, merge, uinput
- Language: C
- Homepage:
- Size: 8.79 KB
- Stars: 22
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mergeinputs
for some reason theres some issues using multiple keyboards simultaneously in linux, for some applications. this is a very small utility to merge/combine keyboards in linux into one `merged input` device.
## usage
```plain
mergeinputs inputeventpaths
example to merge all keyboards: mergeinputs /dev/input/by-path/*-kbd
```depending on your distro you might either need the `input` group or run mergeinputs as root.
## but how does it work?
leveraging the uinput module, mergeinputs is able to sit before any userspace input drivers:
`/dev/input/eventx /dev/input/eventy -> mergeinputs grabs all key events -> "merged input" device -> input drivers -> userspace applications`
this means any application will only see one keyboard (`merged inputs`) pressing keys, eliminating any issues multiple devices might've caused.
## install
`make install`
## auto-start and reload on device change
To start the utility on every boot, a sample systemd unit is provided:
```plain
sudo cp mergeinputs.service /etc/systemd/system
sudo systemctl enable --now mergeinputs
```If you want to restart mergeinputs on device changes to handle hotplugging of keyboards, use the mergeinputs-restart units:
```plain
sudo cp mergeinputs-restart.* /etc/systemd/system
sudo systemctl enable --now mergeinputs-restart.path
```