Any way to conditionally target the -m mode binding? Sidenote, minor issue when adding/removing usb keyboard/xinput
First off, thank you for the amazing package, finally a way I can use my capslock for escape/ctrl in ttys!
So, on to my problem (I'm using X atm).
I've got a custom bash script listening for events via udev, in particular, the addition or removal of my USB keyboard. When I plug in the usb keyboard, I set it on top of the built in keyboard, and therefore disable it using xinput float $(xinput --list | grep -E "AT Translated" | awk '{ print $7 }' | cut -d'=' -f2)
.
It's at this juncture that the issue crops up - my next event is unplugging the USB keyboard, which triggers "xinput reattach " via my script. Without caps2esc, I would then be able to type as normal with the built in keyboard. With caps2esc, when the input disappears+reappears like this, caps2esc will continually register an error event stating the device isn't present, and seemingly fail to propagate any key presses as normal.
Would this be worth fixing in some way, so on a failure to find/relay a device, it just stops intercepting the key presses from it? (aka, acts as if it wasn't active).
In the meantime, I'm guessing I can probably just add a systemctl command to restart the daemon on each event, into my script (do you have any suggestions for running caps2esc as a non-sudo user?)