-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caps Word: make word breaking keys customizable.
Adds an optional callback `caps_word_press_user()` to determine whether a given key should continue Caps Word. Returning true from the callback continues the current "word", while returning false is "word breaking" and deactivates Caps Word. The callback also decides which keys to shift (i.e., the letter keys). The default callback is bool caps_word_press_user(uint16_t keycode) { switch (keycode) { // Keycodes that continue Caps Word, with shift applied. case KC_A ... KC_Z: add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key. return true; // Keycodes that continue Caps Word, without shifting. case KC_1 ... KC_0: case KC_BSPC: case KC_MINS: case KC_UNDS: return true; default: return false; // Deactivate Caps Word. } } This commit also adds logic to handle swap hands keys.
- Loading branch information
Showing
2 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters