Skip to main content

Caps Word Behavior

Summary

The caps word behavior behaves similar to a caps lock, but will automatically deactivate when any key not in a continue list is pressed, or if the caps word key is pressed again. For smaller keyboards using mod-taps, this can help avoid repeated alternating holds when typing words in all caps.

The modifiers are applied only to the alphabetic (A to Z) keycodes, to avoid automatically applying them to numeric values, etc.

Behavior Binding

  • Reference: &caps_word

Example:

&caps_word

Configuration

Continue list

By default, the caps word will remain active when any alphanumeric character or underscore (UNDERSCORE), backspace (BACKSPACE), or delete (DELETE) characters are pressed. Any other non-modifier keycode sent will turn off caps word. If you would like to override this, you can set a new array of keys in the continue-list property in your keymap:

&caps_word {
continue-list = <UNDERSCORE MINUS>;
};

/ {
keymap {
...
};
};

Applied modifier(s)

In addition, if you would like multiple modifiers, instead of just MOD_LSFT, you can override the mods property:

&caps_word {
mods = <(MOD_LSFT | MOD_LALT)>;
};

/ {
keymap {
...
};
};

Multiple Caps Breaks

If you want to use multiple caps breaks with different codes to break the caps, you can add additional caps words instances to use in your keymap:

/ {
prog_caps: prog_caps {
compatible = "zmk,behavior-caps-word";
#binding-cells = <0>;
continue-list = <UNDERSCORE>;
};

keymap {
...
};
};