I like to bind some of my modifier keys to different keys when pressed on their own, as opposed to being pressed in combination with another key. A (very popular) example is: caps lock serves as escape when pressed alone, ctrl when in combination. I use xcape (https://github.com/alols/xcape) to achieve this, but there is (as far as I can see) currently no possibility to archive this with wayland, and it doesn't look like there will be (https://github.com/alols/xcape/issues/67). Not sure where it would be best to implement this, I created an issue for a window manager (https://github.com/SirCmpwn/sway/issues/719) and was redirected here. Is this possible to do with libinput?
in theory yes, but libinput doesn't handle keys at that level. libinput merely forwards the kernel key codes, actual interpretation is done in the caller (i.e. the compositor). so libinput doesn't have a concept of "modifiers", they're all just keys. this is something you'll have to implement in the compositor
Thank you for your response. A unified solution would have been great of course, but then I'll just have to hope a compositor will implement this.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.