Evendup duplicates an input device, making it possibile to use it with multiple applications (Even if they grab it for exclusive use). Evendup will:
- Open the provided input device.
- Issue a IEVIOCGRAB ioctl, so that other applications won't steal it from us.
- Create two clones.
- Loop input events and copy them to all clones
I wrote this simple application because I wanted to control both Kodi and HomeAssistant with my FLIRC remote. They both run on the same RaspberryPI and they assume they are the only users of a given input device.
Basically, evendup is a workaround against unnecessary IEVIOCGRAB ioctl calls.
This is how it can be installed from source on a RaspberryPI Buster
sudo apt-get install git meson libevdev-dev
git clone https://github.com/MatteoNardi/evendup
cd evendup
meson build
cd build
ninja
sudo ninja install
sudo systemctl enable [email protected]_flirc-if01-event-kbd.service
sudo systemctl stop kodi
sudo systemctl stop [email protected]
sudo evendup /dev/input/by-id/usb-flirc.tv_flirc-if01-event-kbd &
sudo systemctl start [email protected]
sudo systemctl start kodi
You'll need to fix uinput permissions:
sudo apt-get install acl
ExecStartPre = sudo setfacl -m u:%u:rw /dev/uinput