qmk_sweep_skeletyl/keyboards/ferris/keymaps/quotengrote/keymap.c

126 lines
5.2 KiB
C

#include QMK_KEYBOARD_H
#include "keymap_german.h"
// combos; https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md
enum combos {
C_AE,
C_UE,
C_OE,
C_SS,
C_KA,
C_KK,
C_ESC,
C_MED,
C_SV // Strg + S
};
const uint16_t PROGMEM ae_combo[] = {LT(0,KC_Q), LT(0,KC_A), COMBO_END};
const uint16_t PROGMEM ue_combo[] = {KC_U, LCTL_T(KC_E), COMBO_END};
const uint16_t PROGMEM oe_combo[] = {KC_BSPC, KC_O, COMBO_END};
const uint16_t PROGMEM ss_combo[] = {LT(0,KC_F), LCTL_T(KC_S), COMBO_END};
const uint16_t PROGMEM ka_combo[] = {LALT_T(KC_R), LSFT_T(KC_T), COMBO_END};
const uint16_t PROGMEM kk_combo[] = {LSFT_T(KC_N), LALT_T(KC_I), COMBO_END};
const uint16_t PROGMEM esc_combo[] = {LCTL_T(KC_S), LSFT_T(KC_T), COMBO_END};
const uint16_t PROGMEM med_combo[] = {LT(3, KC_DEL), MO(3), COMBO_END};
const uint16_t PROGMEM sv_combo[] = {LCTL_T(KC_S), LT(0,KC_C), COMBO_END};
combo_t key_combos[] = {
[C_AE] = COMBO(ae_combo, DE_ADIA),
[C_UE] = COMBO(ue_combo, DE_UDIA),
[C_OE] = COMBO(oe_combo, DE_ODIA),
[C_SS] = COMBO(ss_combo, DE_SS),
[C_KA] = COMBO(ka_combo, LCTL(LALT(KC_A))),
[C_KK] = COMBO(kk_combo, LCTL(LALT(KC_K))),
[C_ESC] = COMBO(esc_combo, KC_ESC),
[C_MED] = COMBO(med_combo, MO(4)),
[C_SV] = COMBO(sv_combo, LCTL(KC_S)),
};
// keymap
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Buchstaben - white
[0] = LAYOUT_split_3x5_2(
LT(0,KC_Q), LT(0,KC_W), LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, KC_U, DE_Z, KC_BSPC,
LT(0,KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), KC_O,
DE_Y, LT(0,KC_X), LT(0,KC_C), LSFT_T(KC_D), LT(0,KC_V), KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
LT(3, KC_DEL), LT(2, KC_ENT), LT(1, KC_SPC), MO(3)
),
// Zahlen - orange
[1] = LAYOUT_split_3x5_2(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_BSPC,
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F10, KC_F11, XXXXXXX, XXXXXXX, KC_F12,
_______, _______, _______, _______
),
// Sym - blue
[2] = LAYOUT_split_3x5_2(
DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC,
DE_EXLM, DE_DQUO, LSFT(DE_ACUT ), DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_TILD, XXXXXXX, DE_ACUT, XXXXXXX, DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH,
_______, _______, _______, _______
),
// Move - green
[3] = LAYOUT_split_3x5_2(
XXXXXXX, KC_HOME, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_HOME, KC_BSPC,
KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL,
XXXXXXX, KC_END, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_END, XXXXXXX,
_______, _______, _______, _______
),
// Media - yellow
[4] = LAYOUT_split_3x5_2(
RGB_TOG, RGB_HUI, RGB_HUD, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, QK_CAPS_WORD_TOGGLE,
RGB_MOD, RGB_SAI, RGB_SAD, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_RMOD, RGB_VAI, RGB_VAD, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______
)
};
// https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md#changing-hold-function
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// "Tap and Hold"
case LT(0,KC_X): // "LT(0,KC_X)" is the keycode that must be mapped
if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X
return false;
}
return true; // Return true for normal processing of tap keycode
case LT(0,KC_C):
if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_C));
return false;
}
return true;
case LT(0,KC_V):
if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_V));
return false;
}
return true;
case LT(0,KC_Q):
if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_Q));
return false;
}
return true;
case LT(0,KC_F):
if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_E));
return false;
}
return true;
case LT(0,KC_A):
if (!record->tap.count && record->event.pressed) {
tap_code16(KC_TAB);
return false;
}
return true;
case LT(0,KC_W):
if (!record->tap.count && record->event.pressed) {
tap_code16(KC_LGUI);
return false;
}
return true;
}
return true;
}