Bump to latest QMK, cleanup
This commit is contained in:
@ -1,25 +1,77 @@
|
||||
#include "keymap.h"
|
||||
#include "layers/layers.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "version.h"
|
||||
#include "keymap_russian.h"
|
||||
#include "keymap_us_international.h"
|
||||
|
||||
|
||||
// Values that should not be saved to git.
|
||||
// There should be a`secrets.h` in this directory
|
||||
// with the following contents:
|
||||
//
|
||||
// #define SECRET_EMAIL "value"
|
||||
// #define SECRET_GMAIL "value"
|
||||
// #define SECRET_SCHOOL_EMAIL "value"
|
||||
#include "secrets.h"
|
||||
|
||||
// Macro keycodes
|
||||
enum custom_keycodes {
|
||||
M_SHUTDOWN = BETA_SAFE_RANGE,
|
||||
|
||||
// Macros
|
||||
M_RESETWM,
|
||||
M_RU_CTRL,
|
||||
M_RU_ALT,
|
||||
|
||||
// Special characters.
|
||||
// M_SPECIAL_TOP and M_SPECIAL_BOTTOM are
|
||||
// bounds used to parse these. Only special
|
||||
// characters should be between them.
|
||||
//
|
||||
// Сharacters here should be in the same
|
||||
// order as they are in the host inteface.
|
||||
M_SPECIAL_TOP,
|
||||
M_SC_GRAVE,
|
||||
M_SC_TILD,
|
||||
M_SC_QUOT,
|
||||
M_SC_LBR,
|
||||
M_SC_RBR,
|
||||
M_SC_LCBR,
|
||||
M_SC_RCBR,
|
||||
M_SC_LKVCH,
|
||||
M_SC_RKVCH,
|
||||
M_SPECIAL_BOTTOM
|
||||
};
|
||||
|
||||
// Tapdance keycodes
|
||||
enum tap_dance_codes {
|
||||
TD_WMLAYOUT,
|
||||
TD_SCREENSHOT,
|
||||
TD_OCR
|
||||
};
|
||||
|
||||
// LED colors
|
||||
#define LC_OFF LC_HSV( 0, 0, 0)
|
||||
#define LC_GREEN LC_HSV( 85, 203, 158)
|
||||
#define LC_YELLOW LC_HSV( 32, 176, 255)
|
||||
#define LC_PINK LC_HSV(243, 222, 234)
|
||||
#define LC_CYAN LC_HSV(134, 255, 213)
|
||||
#define LC_ORANGE LC_HSV( 14, 255, 255)
|
||||
#define LC_WHITE LC_HSV( 0, 0, 150)
|
||||
|
||||
#define LC_RU_B LC_HSV( 0, 0, 165)
|
||||
#define LC_RU_G LC_HSV(153, 255, 153)
|
||||
#define LC_RU_K LC_HSV( 0, 255, 145)
|
||||
|
||||
|
||||
#ifdef ENABLE_HID_SPELLCHECK
|
||||
#include "features/hid_spellcheck.h"
|
||||
#endif
|
||||
|
||||
#include "features/beta_rawhid.h"
|
||||
|
||||
#ifdef ENABLE_AUTOCORRECT
|
||||
#include "features/autocorrect/autocorrect.h"
|
||||
#endif
|
||||
|
||||
// Values that should not be saved to git.
|
||||
// Create a `secrets.h` in the keymap directory.
|
||||
//
|
||||
// It should contain the following:
|
||||
// #define SECRET_EMAIL "val"
|
||||
// #define SECRET_GMAIL "val"
|
||||
// #define SECRET_SCHOOL_EMAIL "val"
|
||||
#include "secrets.h"
|
||||
|
||||
#include "features/beta_rawhid.h"
|
||||
|
||||
// Send a special character.
|
||||
// Returns false if character was caught, true otherwise.
|
||||
@ -31,42 +83,13 @@ bool send_special_character(uint16_t keycode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
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_TWO_KEYS(KC_G, KC_M) {
|
||||
SEND_STRING(SECRET_GMAIL);
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS(KC_L, KC_I) {
|
||||
SEND_STRING(SECRET_SCHOOL_EMAIL);
|
||||
}
|
||||
|
||||
|
||||
SEQ_TWO_KEYS(KC_P, KC_L) {
|
||||
layer_move(LAYER_PLAIN);
|
||||
}
|
||||
|
||||
//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);
|
||||
//}
|
||||
}
|
||||
}
|
||||
// Include all other parts of configuration
|
||||
#include "layers/layers.c"
|
||||
#include "parts/leader.c"
|
||||
#include "parts/tapdance.c"
|
||||
|
||||
// Process macros.
|
||||
// Return FALSE to halt key processing,
|
||||
// Return TRUE to allow QMK to handle keypress.
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
@ -101,9 +124,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
case M_RU_CTRL:
|
||||
if (record->event.pressed) {
|
||||
layer_move(LAYER_MAIN);
|
||||
register_code16(KC_LCTRL);
|
||||
register_code16(KC_LCTL);
|
||||
} else {
|
||||
unregister_code16(KC_LCTRL);
|
||||
unregister_code16(KC_LCTL);
|
||||
layer_move(LAYER_RUSSIAN);
|
||||
}
|
||||
return false;
|
||||
@ -121,4 +144,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user