mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-04-11 23:56:56 -05:00
refactor(docs): Convert the keymaps section into a base folder (#2430)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
72
docs/docs/keymaps/behaviors/caps-word.md
Normal file
72
docs/docs/keymaps/behaviors/caps-word.md
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: Caps Word Behavior
|
||||
sidebar_label: Caps Word
|
||||
---
|
||||
|
||||
## 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](mod-tap.md), 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:
|
||||
|
||||
```dts
|
||||
&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:
|
||||
|
||||
```dts
|
||||
&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:
|
||||
|
||||
```dts
|
||||
&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:
|
||||
|
||||
```dts
|
||||
/ {
|
||||
prog_caps: prog_caps {
|
||||
compatible = "zmk,behavior-caps-word";
|
||||
#binding-cells = <0>;
|
||||
continue-list = <UNDERSCORE>;
|
||||
};
|
||||
|
||||
keymap {
|
||||
...
|
||||
};
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user