*knock* *knock* art thys thung workyng?
It's been a while, but we haven't been whiling away the time[0]. Instead libinput has seen a few new features, scheduled for the upcoming 1.33 release. In this post I'll be discussing the brand new[1] novel[1] innovative[1] feature of the "Click Lock".
Typically, in order to hold a button down a user would have to, well, hold the button down. This is of course inconvenient when something prevents you from doing that, be that some physiodivergency or just lack of patience in regards to the button and it's pressing demands. This is where click lock comes in - it lets you nominate buttons that use a locking approach we typically know from the Caps Lock key[2]: press once to logically hold it down, press a second time to release.
Click Lock does exactly that: you tell libinput that you want buttons BTN_LEFT, BTN_RIGHT to be locked and clicking it once locks the button logically down, pressing it a second time releases the logical button. The exact locking mode is determined by a (configurable) timeout and a (configurable!) movement threshold, so the initial press needs to be held past the (configurable!!) timeout and the movement has to be less than the (configurable!!!) distance - currently defaulting(!!!!) to 1.2s and 1mm, respectively. The timeout can be set to zero in which case any click locks immediately [3].
We may add other modes in the future but for now this one should do for the majority of use-cases. Since this is a (long overdue) accessibility feature, I do encourage the compositor developers to integrate this soon.
And of course credit where it's due, this feature was implemented by Owen Kent, I'm just taking credit via this blog post here to get more internet points.
[0] The jury is still out on how much the time has been whiling away on us though.
[1] A quick check of the xf86-input-mouse driver suggests this feature has existed there since at least the initial git import in 2003 and I can't be bothered going back further. But hey, Apple gets to call existing features innovative and new when they finally implement them, so why not us!
[2] Which everyone of course maps to the compose key to be able to write letters like Æ for Ð when a password field requires English letters only.
[3] Technically this is no longer a "timeout" mode but I figured if you're observant enough to notice that, you've also long noticed the universe is against us when it comes to naming things
No comments:
Post a Comment