Skip to content

Instantly share code, notes, and snippets.

@OlivierLi
Last active November 13, 2020 18:01
Show Gist options
  • Save OlivierLi/545a68161123b28159073e8d3d0c3cb5 to your computer and use it in GitHub Desktop.
Save OlivierLi/545a68161123b28159073e8d3d0c3cb5 to your computer and use it in GitHub Desktop.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static bool modded = false;
uint8_t base_code = keycode & 0x0000FFFF;
if(record->event.pressed){
if(base_code >= KC_A && keycode <= KC_Z){
modded = !modded;
if(!modded){
set_oneshot_mods(MOD_LSFT );
}
}
}
// Rest of your code here ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment