|
|
|
@ -247,8 +247,67 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
return true; //Process all other keycodes normally
|
|
|
|
|
break; //Process all other keycodes normally
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (keycode == KC_LGUI) {
|
|
|
|
|
if (record->event.pressed && !gui_key_down) {
|
|
|
|
|
gui_key_down = true;
|
|
|
|
|
} else if (!record->event.pressed && gui_key_down) {
|
|
|
|
|
if (gui_combo_pressed) {
|
|
|
|
|
unregister_code(KC_LGUI);
|
|
|
|
|
} else if (!gui_disable_tap) {
|
|
|
|
|
tap_code(KC_LGUI);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gui_key_down = false;
|
|
|
|
|
gui_combo_pressed = false;
|
|
|
|
|
gui_disable_tap = false;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!gui_key_down){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Vim keys
|
|
|
|
|
if(!gui_combo_pressed) {
|
|
|
|
|
uint16_t target = 0;
|
|
|
|
|
|
|
|
|
|
if(keycode == KC_H){
|
|
|
|
|
target = KC_LEFT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(keycode == KC_J){
|
|
|
|
|
target = KC_DOWN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(keycode == KC_K){
|
|
|
|
|
target = KC_UP;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(keycode == KC_L){
|
|
|
|
|
target = KC_RIGHT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (target != 0) {
|
|
|
|
|
if(record->event.pressed) {
|
|
|
|
|
register_code(target);
|
|
|
|
|
gui_disable_tap = true;
|
|
|
|
|
} else {
|
|
|
|
|
unregister_code(target);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!gui_combo_pressed) {
|
|
|
|
|
gui_combo_pressed = true;
|
|
|
|
|
register_code(KC_LGUI);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set_layer_color(int layer) {
|
|
|
|
|