Expose an interface to check if a key is being pressed #3444
Labels
enhancement
New feature or request
fixed-in-nightly
This is (or is assumed to be) fixed in the nightly builds.
keyboard
Keyboard mapping/handling
Is your feature request related to a problem? Please describe.
RE: Discussion #3441
I am looking for a way to indicate in the statusbar that the
Caps Lock
is enabled from lua. As a tangential request, it may make sense to expose a way to check if any key is currently being "activated" (pressed).Describe the solution you'd like
There are 2 trains of thought here.
Its worth calling out that this kind of feature, while I think it would be helpful, ultimately wouldn't resolve the issue at hand as
CAPS LOCK
is a special stateful key (IE, CAPS LOCK is either enabled or disabled, similar to how INSERT is either enabled or disabled). Because of this, this first request is a want that could potentially be seen as its own separate work effort (and also "No" is of course acceptable).CAPS LOCK
is currently active (much more achievable IMO).This would function exactly like
window:leader_is_active()
and I imagine under the hood the logic would be nearly the same (though leader has a timeout and caps lock generally doesn't by default).Describe alternatives you've considered
Its possible to wrap the key in a keytable event and track the state of capslock via that but that seems really ick and not at all preferred.
Additional context
Thank you for this project :) I don't know rust in any meaningful way so I unfortunately can't really contribute at this time. Thus all I have are suggestions from an end user perspective :)
The text was updated successfully, but these errors were encountered: