Skip to content

Instantly share code, notes, and snippets.

@rhashimoto
Last active January 29, 2026 17:06
Show Gist options
  • Select an option

  • Save rhashimoto/ee5044aebd2b010c5f3df93881e82619 to your computer and use it in GitHub Desktop.

Select an option

Save rhashimoto/ee5044aebd2b010c5f3df93881e82619 to your computer and use it in GitHub Desktop.
QMK custom handler for layer tap with caps word
// 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