Last active
July 28, 2017 14:36
-
-
Save d-yoshi/18d02e337b80b2d7136343d495e944af to your computer and use it in GitHub Desktop.
LT(layer, kc) のkcが入力されたときのみ何か処理をしたい場合、keydown時のlayerを覚えておいてkeyup時に変わっていないか見れば良い。
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
uint32_t tmp_layer_state = 0; | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case LT(SYMB, KC_LANG2): | |
if (record->event.pressed) { | |
tmp_layer_state = layer_state; | |
} else if (tmp_layer_state == layer_state) { | |
register_code(KC_F16); | |
unregister_code(KC_F16); | |
} | |
break; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment