Added basic russian map
parent
2845481490
commit
41b6c60810
|
@ -3,6 +3,8 @@
|
||||||
// No timeout after initial leader key press
|
// No timeout after initial leader key press
|
||||||
#define LEADER_NO_TIMEOUT
|
#define LEADER_NO_TIMEOUT
|
||||||
|
|
||||||
|
#define COMBO_SHOULD_TRIGGER
|
||||||
|
|
||||||
// Timeout resets after each keypress
|
// Timeout resets after each keypress
|
||||||
#define LEADER_PER_KEY_TIMING
|
#define LEADER_PER_KEY_TIMING
|
||||||
#define LEADER_TIMEOUT 500
|
#define LEADER_TIMEOUT 500
|
||||||
|
|
|
@ -54,9 +54,11 @@ enum custom_keycodes {
|
||||||
#define LC_RED { 0, 255, 145}
|
#define LC_RED { 0, 255, 145}
|
||||||
#define LC_BLU {153, 255, 153}
|
#define LC_BLU {153, 255, 153}
|
||||||
|
|
||||||
#define LC_RU_B LC_HSV( 0, 0, 165)
|
#define LC_RUB { 0, 0, 165}
|
||||||
#define LC_RU_G LC_HSV(153, 255, 153)
|
#define LC_RUG {153, 255, 153}
|
||||||
#define LC_RU_K LC_HSV( 0, 255, 145)
|
#define LC_RUK { 0, 255, 145}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_HID_SPELLCHECK
|
#ifdef ENABLE_HID_SPELLCHECK
|
||||||
|
@ -86,11 +88,16 @@ bool send_special_character(uint16_t keycode) {
|
||||||
|
|
||||||
const uint16_t PROGMEM test_combo2[] = {KC_D, KC_F, COMBO_END};
|
const uint16_t PROGMEM test_combo2[] = {KC_D, KC_F, COMBO_END};
|
||||||
const uint16_t PROGMEM test_combo3[] = {KC_M, KC_P, COMBO_END};
|
const uint16_t PROGMEM test_combo3[] = {KC_M, KC_P, COMBO_END};
|
||||||
|
const uint16_t PROGMEM test_combo4[] = {RU_ER, RU_TE, COMBO_END};
|
||||||
|
const uint16_t PROGMEM test_combo5[] = {RU_EF, RU_GHE, COMBO_END};
|
||||||
combo_t key_combos[] = {
|
combo_t key_combos[] = {
|
||||||
COMBO(test_combo2, KC_TAB),
|
COMBO(test_combo2, KC_TAB),
|
||||||
COMBO(test_combo3, KC_RIGHT),
|
COMBO(test_combo3, KC_RIGHT),
|
||||||
|
COMBO(test_combo4, RU_YO),
|
||||||
|
COMBO(test_combo5, RU_E),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
#ifdef ENABLE_BETA_LEADER
|
#ifdef ENABLE_BETA_LEADER
|
||||||
beta_qk_leader_check();
|
beta_qk_leader_check();
|
||||||
|
@ -109,6 +116,27 @@ enum tap_dance_codes {
|
||||||
#include "parts/leader.c"
|
#include "parts/leader.c"
|
||||||
#include "parts/tapdance.c"
|
#include "parts/tapdance.c"
|
||||||
|
|
||||||
|
bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) {
|
||||||
|
/* Disable combo `SOME_COMBO` on layer `_LAYER_A` */
|
||||||
|
if (
|
||||||
|
combo_index == 0 ||
|
||||||
|
combo_index == 1
|
||||||
|
) {
|
||||||
|
if (layer_state_is(LAYER_RUSSIAN)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
combo_index == 2 ||
|
||||||
|
combo_index == 3
|
||||||
|
) {
|
||||||
|
if (!layer_state_is(LAYER_RUSSIAN)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Process macros.
|
// Process macros.
|
||||||
// Return FALSE to halt key processing,
|
// Return FALSE to halt key processing,
|
||||||
// Return TRUE to allow QMK to handle keypress.
|
// Return TRUE to allow QMK to handle keypress.
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "ctrl.h"
|
#include "ctrl.h"
|
||||||
|
|
||||||
|
#include "russian.h"
|
||||||
|
|
||||||
|
|
||||||
#include "numbers.h" // Must be under symbols and arrows
|
#include "numbers.h" // Must be under symbols and arrows
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
LGUI(KC_ENTER), LGUI(KC_BSLS), \
|
LGUI(KC_ENTER), LGUI(KC_BSLS), \
|
||||||
\
|
\
|
||||||
M_SHUTDOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
M_SHUTDOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TD(TD_WMLAYOUT), \
|
KC_NO, KC_NO, KC_NO, KC_NO, LGUI(KC_SPACE), TD(TD_WMLAYOUT), \
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TT(LAYER_RUSSIAN), \
|
||||||
LCTL(LGUI(LSFT(KC_R))), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
LCTL(LGUI(LSFT(KC_R))), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
KC_NO, KC_NO \
|
KC_NO, KC_NO \
|
||||||
)
|
)
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
LC_OFF, LC_GRN, LC_OFF, LC_ORN, LC_OFF, LC_OFF, \
|
LC_OFF, LC_GRN, LC_OFF, LC_ORN, LC_OFF, LC_OFF, \
|
||||||
LC_PNK, LC_PNK, \
|
LC_PNK, LC_PNK, \
|
||||||
LC_RED, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
LC_RED, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_RED, LC_RED, \
|
||||||
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_BLU, \
|
||||||
LC_ORN, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
LC_ORN, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
LC_OFF, LC_OFF \
|
LC_OFF, LC_OFF \
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
// See symbols.h for docs
|
||||||
|
|
||||||
|
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(RUSSIAN)
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_LAYOUTS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_KEYS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_voyager(\
|
||||||
|
KC_ESCAPE, RU_1, RU_2, RU_3, RU_4, RU_5, \
|
||||||
|
OSL(LAYER_MACROS), RU_CHE, RU_SHA, RU_IE, RU_ER, RU_TE, \
|
||||||
|
KC_DELETE, MT(MOD_LALT, RU_A), RU_ES, RU_DE, RU_EF, RU_GHE, \
|
||||||
|
LM(MOD_LCTL, LAYER_CTRL), RU_ZE, MT(MOD_LSFT, RU_YA), RU_TSE, MO(LAYER_ARROWS), RU_BE, \
|
||||||
|
KC_SPACE, KC_BSPC, \
|
||||||
|
\
|
||||||
|
RU_6, RU_7, RU_8, RU_9, RU_0, LGUI(KC_TAB), \
|
||||||
|
RU_U, RU_YU, RU_I, RU_O, RU_SHCH, RU_HARD, \
|
||||||
|
RU_HA, RU_ZHE, RU_KA, MO(LAYER_SYMBOLS), RU_EL, RU_SOFT, \
|
||||||
|
RU_EN, RU_EM, RU_PE, RU_VE, RU_YERU, RU_SHTI, \
|
||||||
|
KC_RSFT, KC_ENTER \
|
||||||
|
)
|
||||||
|
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_LEDS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA {\
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_RUB, LC_RUB, LC_RUB, LC_RUB, LC_RUB, LC_RUB, \
|
||||||
|
LC_RUG, LC_RUG, LC_RUG, LC_RUG, LC_RUG, LC_RUG, \
|
||||||
|
LC_RUK, LC_RUK, LC_RUK, LC_RUK, LC_RUK, LC_RUK, \
|
||||||
|
LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_RUB, LC_RUB, LC_RUB, LC_RUB, LC_RUB, LC_RUB, \
|
||||||
|
LC_RUG, LC_RUG, LC_RUG, LC_RUG, LC_RUG, LC_RUG, \
|
||||||
|
LC_RUK, LC_RUK, LC_RUK, LC_RUK, LC_RUK, LC_RUK, \
|
||||||
|
LC_OFF, LC_OFF \
|
||||||
|
}
|
||||||
|
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#undef BETA_LAYER_CONTEXT_DATA
|
||||||
|
#undef BETA_LAYER_MAGIC_MACRO
|
Loading…
Reference in New Issue