Last active
April 26, 2021 19:39
-
-
Save hunterwei/991e852511a25ad7daff07829a9aeb9a to your computer and use it in GitHub Desktop.
QMK micro to shift letters by double tap
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
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