Skip to content

Allow customization of which keys caps_word modifies but rebased#3321

Open
Zayon wants to merge 4 commits intozmkfirmware:mainfrom
Zayon:caps-word
Open

Allow customization of which keys caps_word modifies but rebased#3321
Zayon wants to merge 4 commits intozmkfirmware:mainfrom
Zayon:caps-word

Conversation

@Zayon
Copy link
Copy Markdown

@Zayon Zayon commented Apr 5, 2026

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

Changed behavior_caps_word.c to be conditionally compiled instead of
wrapping the entire contents of the file in an #if.

Renamed macros that still referred to "break" instead of "continuation".

Changed the type of the continuations count field to allow for more than
255 continuation keys.

Reordered a struct to allow for better packing.

Switched to statically initializing the devs[] array instead of using an
index field in each device's config struct and the init function.

Refactored caps_word_keycode_state_changed_listener() and
caps_word_enhance_usage() to allow for more easily changing
the conditions for what breaks a word and whether mods should be applied
in future commits.
Unified devicetree key code parameter decoding between key press and
caps word behaviors.

Reordered zmk_keycode_state_changed fields for better packing.
Added a shift-list property to caps word to allow adding more keys to
be shifted aside from alpha keys.

Added a &prog_word behavior, which is the same as &caps_word, except it
adds MINUS to shift-list (this matches QMK's caps word behavior).

Added a no-default-keys property to caps_word, which removes the
implicit alphanumeric keys from continue-list and shift-list so you can
fully customize the lists.

Also adjusted the default continue keys to include numpad numbers,
since those are numbers too.
@Zayon Zayon requested review from a team as code owners April 5, 2026 22:39
@Zayon
Copy link
Copy Markdown
Author

Zayon commented Apr 5, 2026

This PR is #1742 but rebased

@Zayon Zayon changed the title Caps word Allow customization of which keys caps_word modifies but rebased Apr 5, 2026
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 this pull request may close these issues.

2 participants