evremap
evremap copied to clipboard
Feature request: Support waiting for keyboard to be connected
I have evremap
set up for my bluetooth keyboard which is sometimes not connected at all. So, systemd
ends up restarting evremap
once a couple of seconds which ends up increasing PIDs on my entire system after some time. I think this is not ideal and some mechanism for waiting on connection could be good?
Sounds reasonable. I think this would need a way to wait on an event from the kernel when a new device shows up (so that it's not busy waiting, and not sleeping for too long).
I don't have time to work on this, but I'm open to reviewing a PR that adds this.
I've solved a similar problem with my bluetooth shutter button by using udev
instead:
ACTION=="bind", SUBSYSTEM=="hid", ENV{HID_NAME}=="AB Shutter3", RUN+="/usr/bin/evremap remap -d 0 /home/anderson/.config/evremap-btbutton.toml"
HID_NAME
can be extracted by using udevadm monitor -k
.