Last active
January 29, 2026 17:06
-
-
Save rhashimoto/ee5044aebd2b010c5f3df93881e82619 to your computer and use it in GitHub Desktop.
QMK custom handler for layer tap with caps word
This file contains hidden or 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
| // Layer tap requires a basic keycode, so LT(1,CW_TOGG) doesn't | |
| // work. Work around this by intercepting a valid keycode (here | |
| // I arbitrarily chose the left shift key) with this handler. | |
| bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
| switch (keycode) { | |
| case LT(1,KC_LSFT): | |
| // Layer tap with shift key invokes caps word. | |
| if (record->tap.count && record->event.pressed) { | |
| caps_word_toggle(); | |
| return false; | |
| } | |
| break; | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment