Skip to content
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_is_numeric may need to honor ev->implicit_modifiers #2723

Open
matthewtodd opened this issue Dec 18, 2024 · 1 comment · May be fixed by #2731
Open

caps_word_is_numeric may need to honor ev->implicit_modifiers #2723

matthewtodd opened this issue Dec 18, 2024 · 1 comment · May be fixed by #2731

Comments

@matthewtodd
Copy link

matthewtodd commented Dec 18, 2024

I write comments like FIXME(mt): and find that &caps_word doesn't deactivate after the opening parenthesis, though I would like it to!

I suspect this is because caps_word_is_numeric only looks at the 8-bit keycode, and that it should also take modifiers into account, perhaps somewhat as caps_word_is_caps_includelist does.

(Indeed, on further experimentation, I find that &caps_word stays active through all of !@#$%^&*(), which seems to corroborate the suspicion.)

Does all that seem right?

(Also, thank you for ZMK, I'm very grateful for your work!)

@DanFan1988
Copy link

+1

matthewtodd added a commit to matthewtodd/zmk that referenced this issue Dec 22, 2024
Fixes zmkfirmware#2723.

I discovered this by trying to use caps_word for comment markers like
`FIXME(mt):` and finding that the opening left parenthesis didn't
deactivate caps_word.
matthewtodd added a commit to matthewtodd/zmk that referenced this issue Dec 22, 2024
Fixes zmkfirmware#2723.

The caps_word behavior now strictly honors `[A-Za-z0-9_]` as the default
continuation characters. Previously `!@#$%^&*()` were mistakenly also
honored.

I discovered this by trying to use caps_word for comment markers like
`FIXME(mt):` and finding that the opening left parenthesis didn't
deactivate caps_word.
matthewtodd added a commit to matthewtodd/zmk that referenced this issue Dec 22, 2024
Fixes zmkfirmware#2723.

The caps_word behavior now strictly honors `[A-Za-z0-9_]` as the default
continuation characters. (Previously `!@#$%^&*()` were mistakenly also
honored.)

I discovered this by trying to use caps_word for comment markers like
`FIXME(mt):` and finding that the opening left parenthesis didn't
deactivate caps_word.
@matthewtodd matthewtodd linked a pull request Dec 22, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants