Added basic russian map

master
Mark 2024-01-29 11:34:03 -08:00
parent 2845481490
commit 41b6c60810
No known key found for this signature in database
GPG Key ID: B4DF96450FAAD9F2
5 changed files with 86 additions and 7 deletions

View File

@ -3,6 +3,8 @@
// No timeout after initial leader key press
#define LEADER_NO_TIMEOUT
#define COMBO_SHOULD_TRIGGER
// Timeout resets after each keypress
#define LEADER_PER_KEY_TIMING
#define LEADER_TIMEOUT 500

View File

@ -54,9 +54,11 @@ enum custom_keycodes {
#define LC_RED { 0, 255, 145}
#define LC_BLU {153, 255, 153}
#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)
#define LC_RUB { 0, 0, 165}
#define LC_RUG {153, 255, 153}
#define LC_RUK { 0, 255, 145}
#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_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(test_combo2, KC_TAB),
COMBO(test_combo3, KC_RIGHT),
COMBO(test_combo4, RU_YO),
COMBO(test_combo5, RU_E),
};
void matrix_scan_user(void) {
#ifdef ENABLE_BETA_LEADER
beta_qk_leader_check();
@ -109,6 +116,27 @@ enum tap_dance_codes {
#include "parts/leader.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.
// Return FALSE to halt key processing,
// Return TRUE to allow QMK to handle keypress.

View File

@ -13,6 +13,8 @@
#include "main.h"
#include "ctrl.h"
#include "russian.h"
#include "numbers.h" // Must be under symbols and arrows

View File

@ -16,8 +16,8 @@
LGUI(KC_ENTER), LGUI(KC_BSLS), \
\
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, KC_NO, KC_NO, \
KC_NO, KC_NO, KC_NO, KC_NO, LGUI(KC_SPACE), TD(TD_WMLAYOUT), \
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, \
KC_NO, KC_NO \
)
@ -34,8 +34,8 @@
LC_OFF, LC_GRN, LC_OFF, LC_ORN, LC_OFF, LC_OFF, \
LC_PNK, LC_PNK, \
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_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_BLU, \
LC_ORN, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
LC_OFF, LC_OFF \
}

View File

@ -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