Skip to content

Instantly share code, notes, and snippets.

@hunterwei
Last active April 26, 2021 19:39
Show Gist options
  • Save hunterwei/991e852511a25ad7daff07829a9aeb9a to your computer and use it in GitHub Desktop.
Save hunterwei/991e852511a25ad7daff07829a9aeb9a to your computer and use it in GitHub Desktop.
QMK micro to shift letters by double tap
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint8_t basic_keycode = 0;
if (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX){
basic_keycode = (uint8_t)(keycode & 0xFF);
}
switch(keycode) {
case LT(0,KC_A):
if (record->event.pressed) {
if (record->tap.count == 2) {
register_mods(MOD_BIT(KC_LSFT));
}
register_code(keycode);
} else {
unregister_code(keycode);
if (record->tap.count == 2) {
unregister_mods(MOD_BIT(KC_LSFT));
}
}
return false;
break;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment