83 lines
1.6 KiB
C
83 lines
1.6 KiB
C
#include "keymap.h"
|
|
#include "layers/layers.h"
|
|
|
|
// Values that should not be saved to git.
|
|
// Create a `secrets.h` in the keymap directory.
|
|
//
|
|
// It should define the following:
|
|
// SECRET_EMAIL
|
|
#include "secrets.h"
|
|
|
|
|
|
|
|
|
|
LEADER_EXTERNS();
|
|
void leader_start(void) { ergodox_right_led_3_on(); }
|
|
void leader_end(void) { ergodox_right_led_3_off(); }
|
|
void matrix_scan_user(void) {
|
|
LEADER_DICTIONARY() {
|
|
leading = false;
|
|
leader_end();
|
|
|
|
SEQ_TWO_KEYS(KC_E, KC_M) {
|
|
SEND_STRING(SECRET_EMAIL);
|
|
}
|
|
|
|
//SEQ_ONE_KEY(KC_F) {}
|
|
//
|
|
//SEQ_TWO_KEYS(KC_A, KC_S) {
|
|
// register_code(KC_LGUI);
|
|
// register_code(KC_S);
|
|
// unregister_code(KC_S);
|
|
// unregister_code(KC_LGUI);
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Return FALSE to halt key processing,
|
|
// Return TRUE to allow QMK to handle keypress.
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
// Handle macros
|
|
switch (keycode) {
|
|
case M_RESETWM:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(SS_LCTL(SS_LGUI(SS_LSFT(SS_TAP(X_R)))));
|
|
}
|
|
return false;
|
|
|
|
case M_SHUTDOWN:
|
|
if (record->event.pressed) {
|
|
SEND_STRING(SS_LGUI(SS_TAP(X_P)) SS_DELAY(100) SS_TAP(X_Y) SS_DELAY(100) SS_TAP(X_ENTER));
|
|
}
|
|
return false;
|
|
|
|
case M_RU_CTRL:
|
|
if (record->event.pressed) {
|
|
layer_move(LAYER_MAIN);
|
|
register_code16(KC_LCTRL);
|
|
} else {
|
|
unregister_code16(KC_LCTRL);
|
|
layer_move(LAYER_RUSSIAN);
|
|
}
|
|
return false;
|
|
|
|
case M_RU_ALT:
|
|
if (record->event.pressed) {
|
|
layer_move(LAYER_MAIN);
|
|
register_code16(KC_LALT);
|
|
} else {
|
|
unregister_code16(KC_LALT);
|
|
layer_move(LAYER_RUSSIAN);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
return true;
|
|
} |