-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caps word mode #711
Comments
This does not seem like an unreasonable assumption. Most of the time capslock will be off when keyd is started (on boot or after typing a lower case terminal command).
Capslock itself is a stateful mechanism that the user has to keep track of in their mind. In the worst case the user can just toggle it themselves to ensure synchrony, so I do not think the initialization edge case warrants a dedicated feature. Even if one wanted to do this, capslock state is a display server construct. There is no way to recover it in evdev. One could resort to hacks like scanning the capslock LED state (set by the display server), but then you are just tossing another fragile kludge onto the pile. |
This is unfortunate, but this makes sense. I will forget about trying to track the state of capslock then. It just means that "smart capslock" can hardly become a thing. Apart from this, implementing caps word mode with shift can be done with the current implementation as follows (example that you gave me on another issue):
I am not sure that there is other discussions to have about this, so I will close the issue. But this can be reopened if further comments are posted. |
QMK include a caps word mode in its implementation. It allows you to go into a shift-toggle layer, but only for the length of a word, and then automatically deactivate this layer so that only one word is capitalized.
We started taking about such a mode in the following issue:
#671
And here is the page pointing to the QMK documentation:
https://github.com/qmk/qmk_firmware/blob/master/docs/feature_caps_word.md
First, I want to note that using a regular shift modifier or enabling capslock are two different behaviors. I personally find that this feature is better when a proper capslock is used. As an example, when taking the AZERTY French keyboard layout, there is the number
2
key (in the number row) that is the accentuatedé
letter on normal tap, and the number2
when shifted. However, when capslock is activated, it produces an uppercaseÉ
.My current implementation of caps word mode in key is as follows.
It poorly assumes that capslock is not active when
keyd
starts, and then tries to stay in sync with the state of capslock by activating or deactivating a layer namedcapslock
using macros.It is a bit hacky and maybe can be improved, especially if we could have a native
capslock
layer internally managed bykeyd
that would follow the state of capslock.Also, this layer deactivates when
enter
,space
,comma
ordot
is typed.The text was updated successfully, but these errors were encountered: