evremap icon indicating copy to clipboard operation
evremap copied to clipboard

Feature request: Support waiting for keyboard to be connected

Open khokho opened this issue 1 year ago • 2 comments

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?

khokho avatar Jul 24 '23 07:07 khokho

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.

wez avatar Jul 26 '23 14:07 wez

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.

and3rson avatar Oct 30 '23 15:10 and3rson