This is a continuation of a discussion from #71.
First, a small summary of how device grabbing was implemented in swhkd
as I understand it:
To avoid grabbing all devices and swallowing their events (mouse cursor movements, for instance), a keyboard detection algorithm was first implemented in 8bbd34c. It checks if a given device is a keyboard by checking for the presence of the Enter key.
This was not completely correct, as some users still had their non-keyboard devices grabbed by swhkd
(see #131) and this was causing other issues. For some others, some hardware keys were not recognized as keyboards (see #71).
In answer to these issues, a --device
argument was added to swhkd
in b53b8c. This allows users to explicitely tell what devices to use. With some configuration from users, this thus solves the issues.
Ideally, users should not have to worry about what device swhkd
should grab - it should do it correctly out of the box.
In #163, we added support for re-emitting most device events from the grabbed device to the virtual uinput device of swhkd.
With this improvement, it should not be necessary anymore to avoid grabbing all devices, as swhkd
can just re-emit events as needed. Additionally, the --device
argument is probably unnecessary and could be deprecated.
Enhancement Difficulty: low Component: daemon