You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
1.1 KiB

//instanalize an instance of 'tap' for the Semicolon - Colon tap dance.
static tap scln_coln_state = {
.is_press_action = true,
.state = 0
};
void scln_coln_finished(tap_dance_state_t *state, void *user_data) {
scln_coln_state.state = current_dance(state);
switch (scln_coln_state.state) {
case SINGLE_TAP:
register_code(KC_SCLN);
break;
case SINGLE_HOLD:
register_code(KC_LALT);
register_code(KC_LSFT);
register_code(KC_LGUI);
break;
case DOUBLE_TAP:
register_code16(KC_COLN);
break;
}
}
void scln_coln_reset(tap_dance_state_t *state, void *user_data) {
switch (scln_coln_state.state) {
case SINGLE_TAP:
unregister_code(KC_SCLN);
break;
case SINGLE_HOLD:
unregister_code(KC_LALT);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
break;
case DOUBLE_TAP:
unregister_code16(KC_COLN);
break;
}
scln_coln_state.state = 0;
}