Bug 96621 - bind modifier keys separately when pressed alone (similar to xcape)
Summary: bind modifier keys separately when pressed alone (similar to xcape)
Status: RESOLVED WONTFIX
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 18:57 UTC by eisfreak7
Modified: 2016-06-24 05:36 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description eisfreak7 2016-06-21 18:57:25 UTC
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?
Comment 1 Peter Hutterer 2016-06-24 04:07:02 UTC
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
Comment 2 eisfreak7 2016-06-24 05:36:25 UTC
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.