skeletyl, sweep, planck: names for layers (#3)

Reviewed-on: #3
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-08-21 09:46:23 +02:00 committed by Michael Grote
parent dcd5c66394
commit 3112e50c2a
3 changed files with 133 additions and 105 deletions

View file

@ -1,6 +1,16 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "keymap_german.h" #include "keymap_german.h"
// layers
enum layers {
_BASE,
_NUM,
_SYM,
_MOV,
_MEDIA
};
// rgb // rgb
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // Enables RGB, without saving settings rgblight_enable_noeeprom(); // Enables RGB, without saving settings
@ -98,16 +108,16 @@ const uint16_t PROGMEM alt_combo[] = {LCTL_T(KC_E), KC_I, COMBO_END}
const uint16_t PROGMEM ka_combo[] = {KC_R, LSFT_T(KC_T), COMBO_END}; const uint16_t PROGMEM ka_combo[] = {KC_R, LSFT_T(KC_T), COMBO_END};
const uint16_t PROGMEM kk_combo[] = {LSFT_T(KC_N), KC_I, COMBO_END}; const uint16_t PROGMEM kk_combo[] = {LSFT_T(KC_N), KC_I, COMBO_END};
const uint16_t PROGMEM esc_combo[] = {LCTL_T(KC_S), LSFT_T(KC_T), 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 med_combo[] = {LT(_MOV, KC_DEL), MO(_MOV), COMBO_END};
const uint16_t PROGMEM sv_combo[] = {LCTL_T(KC_S), LT(0,KC_C), COMBO_END}; const uint16_t PROGMEM sv_combo[] = {LCTL_T(KC_S), LT(_BASE,KC_C), COMBO_END};
const uint16_t PROGMEM we_combo[] = {LT(0,KC_W), LCTL_T(KC_E), COMBO_END}; const uint16_t PROGMEM we_combo[] = {LT(_BASE,KC_W), LCTL_T(KC_E), COMBO_END};
combo_t key_combos[] = { combo_t key_combos[] = {
[C_ALT] = COMBO(alt_combo, KC_LALT), [C_ALT] = COMBO(alt_combo, KC_LALT),
[C_KA] = COMBO(ka_combo, LCTL(LALT(KC_A))), [C_KA] = COMBO(ka_combo, LCTL(LALT(KC_A))),
[C_KK] = COMBO(kk_combo, LCTL(LALT(KC_K))), [C_KK] = COMBO(kk_combo, LCTL(LALT(KC_K))),
[C_ESC] = COMBO(esc_combo, KC_ESC), [C_ESC] = COMBO(esc_combo, KC_ESC),
[C_MED] = COMBO(med_combo, MO(4)), [C_MED] = COMBO(med_combo, MO(_MEDIA)),
[C_SV] = COMBO(sv_combo, LCTL(KC_S)), [C_SV] = COMBO(sv_combo, LCTL(KC_S)),
[C_WE] = COMBO(we_combo, LGUI(KC_E)), [C_WE] = COMBO(we_combo, LGUI(KC_E)),
}; };
@ -115,35 +125,35 @@ combo_t key_combos[] = {
// keymap // keymap
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Buchstaben - white // Buchstaben - white
[0] = LAYOUT_split_3x5_3( [_BASE] = LAYOUT_split_3x5_3(
LT(0,KC_Q), LT(0,KC_W), LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, LT(0,KC_U), DE_Z, KC_BSPC, LT(_BASE,KC_Q), LT(_BASE,KC_W), LT(_BASE,KC_F), KC_P, KC_B, KC_J, KC_L, LT(_BASE,KC_U), DE_Z, KC_BSPC,
LT(0,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, LT(0,KC_O), LT(_BASE,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, LT(_BASE,KC_O),
LT(0,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(_BASE,DE_Y), LT(_BASE,KC_X), LT(_BASE,KC_C), LSFT_T(KC_D), LT(_BASE,KC_V), KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
XXXXXXX, LT(3, KC_DEL), LT(2, KC_ENT), LT(1, KC_SPC), MO(3), XXXXXXX XXXXXXX, LT(_MOV, KC_DEL), LT(_SYM, KC_ENT), LT(_NUM, KC_SPC), MO(_MOV), XXXXXXX
), ),
// Zahlen - orange // Zahlen - orange
[1] = LAYOUT_split_3x5_3( [_NUM] = LAYOUT_split_3x5_3(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_BSPC, 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, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F10, KC_F11, _______, _______, KC_F12, QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F10, KC_F11, _______, _______, KC_F12,
XXXXXXX, _______, _______, _______, _______, XXXXXXX XXXXXXX, _______, _______, _______, _______, XXXXXXX
), ),
// Sym - blue // Sym - blue
[2] = LAYOUT_split_3x5_3( [_SYM] = LAYOUT_split_3x5_3(
DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC, DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC,
DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES, DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH, DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH,
XXXXXXX, _______, _______, _______, _______, XXXXXXX XXXXXXX, _______, _______, _______, _______, XXXXXXX
), ),
// Move - green // Move - green
[3] = LAYOUT_split_3x5_3( [_MOV] = LAYOUT_split_3x5_3(
XXXXXXX, KC_HOME, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_HOME, KC_BSPC, 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, 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, XXXXXXX, KC_END, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_END, XXXXXXX,
XXXXXXX, _______, _______, _______, _______, XXXXXXX XXXXXXX, _______, _______, _______, _______, XXXXXXX
), ),
// Media - yellow // Media - yellow
[4] = LAYOUT_split_3x5_3( [_MEDIA] = LAYOUT_split_3x5_3(
RGB_TOG, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX,
@ -155,61 +165,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// "Tap and Hold" // "Tap and Hold"
case LT(0,KC_X): // "LT(0,KC_X)" is the keycode that must be mapped case LT(_BASE,KC_X): // "LT(_BASE,KC_X)" is the keycode that must be mapped
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X
return false; return false;
} }
return true; // Return true for normal processing of tap keycode return true; // Return true for normal processing of tap keycode
case LT(0,DE_Y): case LT(_BASE,DE_Y):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_PIPE); tap_code16(DE_PIPE);
return false; return false;
} }
return true; return true;
case LT(0,KC_C): case LT(_BASE,KC_C):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_C)); tap_code16(LCTL(KC_C));
return false; return false;
} }
return true; return true;
case LT(0,KC_V): case LT(_BASE,KC_V):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_V)); tap_code16(LCTL(KC_V));
return false; return false;
} }
return true; return true;
case LT(0,KC_Q): case LT(_BASE,KC_Q):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_Q)); tap_code16(RALT(KC_Q));
return false; return false;
} }
return true; return true;
case LT(0,KC_F): case LT(_BASE,KC_F):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_E)); tap_code16(RALT(KC_E));
return false; return false;
} }
return true; return true;
case LT(0,KC_A): case LT(_BASE,KC_A):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ADIA); tap_code16(DE_ADIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_O): case LT(_BASE,KC_O):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ODIA); tap_code16(DE_ODIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_U): case LT(_BASE,KC_U):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_UDIA); tap_code16(DE_UDIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_W): case LT(_BASE,KC_W):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(KC_LGUI); tap_code16(KC_LGUI);
return false; return false;

View file

@ -1,6 +1,15 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "keymap_german.h" #include "keymap_german.h"
// layers
enum layers {
_BASE,
_NUM,
_SYM,
_MOV,
_MEDIA
};
// combos; https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md // combos; https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md
enum combos { enum combos {
C_ALT, C_ALT,
@ -16,52 +25,52 @@ const uint16_t PROGMEM alt_combo[] = {LCTL_T(KC_E), KC_I, COMBO_END}
const uint16_t PROGMEM ka_combo[] = {KC_R, LSFT_T(KC_T), COMBO_END}; const uint16_t PROGMEM ka_combo[] = {KC_R, LSFT_T(KC_T), COMBO_END};
const uint16_t PROGMEM kk_combo[] = {LSFT_T(KC_N), KC_I, COMBO_END}; const uint16_t PROGMEM kk_combo[] = {LSFT_T(KC_N), KC_I, COMBO_END};
const uint16_t PROGMEM esc_combo[] = {LCTL_T(KC_S), LSFT_T(KC_T), 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 med_combo[] = {LT(_MOV, KC_DEL), MO(_MOV), COMBO_END};
const uint16_t PROGMEM sv_combo[] = {LCTL_T(KC_S), LT(0,KC_C), COMBO_END}; const uint16_t PROGMEM sv_combo[] = {LCTL_T(KC_S), LT(_BASE,KC_C), COMBO_END};
const uint16_t PROGMEM we_combo[] = {LT(0,KC_W), LCTL_T(KC_E), COMBO_END}; const uint16_t PROGMEM we_combo[] = {LT(_BASE,KC_W), LCTL_T(KC_E), COMBO_END};
combo_t key_combos[] = { combo_t key_combos[] = {
[C_ALT] = COMBO(alt_combo, KC_LALT), [C_ALT] = COMBO(alt_combo, KC_LALT),
[C_KA] = COMBO(ka_combo, LCTL(LALT(KC_A))), [C_KA] = COMBO(ka_combo, LCTL(LALT(KC_A))),
[C_KK] = COMBO(kk_combo, LCTL(LALT(KC_K))), [C_KK] = COMBO(kk_combo, LCTL(LALT(KC_K))),
[C_ESC] = COMBO(esc_combo, KC_ESC), [C_ESC] = COMBO(esc_combo, KC_ESC),
[C_MED] = COMBO(med_combo, MO(4)), [C_MED] = COMBO(med_combo, MO(_MEDIA)),
[C_SV] = COMBO(sv_combo, LCTL(KC_S)), [C_SV] = COMBO(sv_combo, LCTL(KC_S)),
[C_WE] = COMBO(we_combo, LGUI(KC_E)), [C_WE] = COMBO(we_combo, LGUI(KC_E)),
}; };
// keymap // keymap
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Buchstaben - white // white
[0] = LAYOUT_split_3x5_2( [_BASE] = LAYOUT_split_3x5_2(
LT(0,KC_Q), LT(0,KC_W), LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, LT(0,KC_U), DE_Z, KC_BSPC, LT(_BASE,KC_Q), LT(_BASE,KC_W), LT(_BASE,KC_F), KC_P, KC_B, KC_J, KC_L, LT(_BASE,KC_U), DE_Z, KC_BSPC,
LT(0,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, LT(0,KC_O), LT(_BASE,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, LT(_BASE,KC_O),
LT(0,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(_BASE,DE_Y), LT(_BASE,KC_X), LT(_BASE,KC_C), LSFT_T(KC_D), LT(_BASE,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) LT(_MOV, KC_DEL), LT(_SYM, KC_ENT), LT(_NUM, KC_SPC), MO(_MOV)
), ),
// Zahlen - orange // orange
[1] = LAYOUT_split_3x5_2( [_NUM] = 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_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, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F10, KC_F11, _______, _______, KC_F12, QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F10, KC_F11, _______, _______, KC_F12,
_______, _______, _______, _______ _______, _______, _______, _______
), ),
// Sym - blue // blue
[2] = LAYOUT_split_3x5_2( [_SYM] = 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_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC,
DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES, DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH, DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH,
_______, _______, _______, _______ _______, _______, _______, _______
), ),
// Move - green // green
[3] = LAYOUT_split_3x5_2( [_MOV] = LAYOUT_split_3x5_2(
XXXXXXX, KC_HOME, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_HOME, KC_BSPC, 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, 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, XXXXXXX, KC_END, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_END, XXXXXXX,
_______, _______, _______, _______ _______, _______, _______, _______
), ),
// Media - yellow // yellow
[4] = LAYOUT_split_3x5_2( [_MEDIA] = LAYOUT_split_3x5_2(
RGB_TOG, RGB_HUI, RGB_HUD, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_HUD, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_MOD, RGB_SAI, RGB_SAD, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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, RGB_RMOD, RGB_VAI, RGB_VAD, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX,
@ -72,61 +81,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// "Tap and Hold" // "Tap and Hold"
case LT(0,KC_X): // "LT(0,KC_X)" is the keycode that must be mapped case LT(_BASE,KC_X): // "LT(_BASE,KC_X)" is the keycode that must be mapped
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X
return false; return false;
} }
return true; // Return true for normal processing of tap keycode return true; // Return true for normal processing of tap keycode
case LT(0,DE_Y): case LT(_BASE,DE_Y):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_PIPE); tap_code16(DE_PIPE);
return false; return false;
} }
return true; return true;
case LT(0,KC_C): case LT(_BASE,KC_C):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_C)); tap_code16(LCTL(KC_C));
return false; return false;
} }
return true; return true;
case LT(0,KC_V): case LT(_BASE,KC_V):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_V)); tap_code16(LCTL(KC_V));
return false; return false;
} }
return true; return true;
case LT(0,KC_Q): case LT(_BASE,KC_Q):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_Q)); tap_code16(RALT(KC_Q));
return false; return false;
} }
return true; return true;
case LT(0,KC_F): case LT(_BASE,KC_F):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_E)); tap_code16(RALT(KC_E));
return false; return false;
} }
return true; return true;
case LT(0,KC_A): case LT(_BASE,KC_A):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ADIA); tap_code16(DE_ADIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_O): case LT(_BASE,KC_O):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ODIA); tap_code16(DE_ODIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_U): case LT(_BASE,KC_U):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_UDIA); tap_code16(DE_UDIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_W): case LT(_BASE,KC_W):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(KC_LGUI); tap_code16(KC_LGUI);
return false; return false;

View file

@ -1,6 +1,15 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "keymap_german.h" #include "keymap_german.h"
// layers
enum layers {
_BASE,
_NUM,
_SYM,
_MOV,
_MEDIA
};
// rgb // rgb
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // Enables RGB, without saving settings rgblight_enable_noeeprom(); // Enables RGB, without saving settings
@ -118,45 +127,45 @@ enum combos {
}; };
const uint16_t PROGMEM med_combo[] = {KC_DEL, KC_LEFT, COMBO_END}; const uint16_t PROGMEM med_combo[] = {KC_DEL, KC_LEFT, COMBO_END};
combo_t key_combos[] = { combo_t key_combos[] = {
[C_MED] = COMBO(med_combo, MO(4)), [C_MED] = COMBO(med_combo, MO(_MEDIA)),
}; };
// keymap // keymap
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Buchstaben - white // white
[0] = LAYOUT_planck_mit( [_BASE] = LAYOUT_planck_mit(
KC_ESC, LT(0,KC_Q), KC_W, LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, LT(0,KC_U), DE_Z, XXXXXXX, KC_BSPC, KC_ESC, LT(_BASE,KC_Q), KC_W, LT(_BASE,KC_F), KC_P, KC_B, KC_J, KC_L, LT(_BASE,KC_U), DE_Z, XXXXXXX, KC_BSPC,
KC_TAB, LT(0,KC_A), KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, LT(0,KC_O), KC_ENT, KC_TAB, LT(_BASE,KC_A), KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, LT(_BASE,KC_O), KC_ENT,
KC_LSFT, LT(0,DE_Y), LT(0,KC_X), LT(0,KC_C), KC_D, LT(0,KC_V), KC_K, KC_H, DE_COMM, DE_DOT, DE_MINS, DE_HASH, KC_LSFT, LT(_BASE,DE_Y), LT(_BASE,KC_X), LT(_BASE,KC_C), KC_D, LT(_BASE,KC_V), KC_K, KC_H, DE_COMM, DE_DOT, DE_MINS, DE_HASH,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(2), LT(3, KC_SPC), MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_SYM), LT(_MOV, KC_SPC), MO(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
), ),
// Zahlen - orange // orange
[1] = LAYOUT_planck_mit( [_NUM] = LAYOUT_planck_mit(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_BSPC, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_BSPC,
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENT, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENT,
KC_LSFT, QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_F11, KC_F12, DE_HASH, KC_LSFT, QK_CAPS_WORD_TOGGLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_F11, KC_F12, DE_HASH,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_SYM), KC_SPC, MO(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
), ),
// Sym - blue // blue
[2] = LAYOUT_planck_mit( [_SYM] = LAYOUT_planck_mit(
KC_ESC, DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC, KC_BSPC, KC_ESC, DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC, KC_BSPC,
KC_TAB, DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES, KC_ENT, KC_TAB, DE_EXLM, DE_DQUO, DE_SS, DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES, KC_ENT,
KC_LSFT, DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK, DE_RABK, XXXXXXX, DE_PLUS, DE_EQL, DE_HASH, XXXXXXX, KC_LSFT, DE_TILD, DE_ACUT, XXXXXXX, LSFT(DE_ACUT), DE_LABK, DE_RABK, XXXXXXX, DE_PLUS, DE_EQL, DE_HASH, XXXXXXX,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_SYM), KC_SPC, MO(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
), ),
// Move - green // green
[3] = LAYOUT_planck_mit( [_MOV] = LAYOUT_planck_mit(
KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_HOME, KC_BSPC, KC_BSPC, KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_HOME, KC_BSPC, KC_BSPC,
KC_TAB, KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT,XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, KC_ENT, KC_TAB, KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, KC_ENT,
KC_LSFT, XXXXXXX, KC_END, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_END, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, KC_END, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_END, XXXXXXX, XXXXXXX,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_SYM), KC_SPC, MO(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
), ),
// Media - yellow // yellow
[4] = LAYOUT_planck_mit( [_MEDIA] = LAYOUT_planck_mit(
KC_ESC, RGB_TOG, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_ESC, RGB_TOG, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC,
KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT,
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_SYM), KC_SPC, MO(_NUM), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
) )
}; };
@ -164,55 +173,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// "Tap and Hold" // "Tap and Hold"
case LT(0,KC_X): // "LT(0,KC_X)" is the keycode that must be mapped case LT(_BASE,KC_X): // "LT(_BASE,KC_X)" is the keycode that must be mapped
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X tap_code16(LCTL(KC_X)); // Intercept hold function to send Ctrl-X
return false; return false;
} }
return true; // Return true for normal processing of tap keycode return true; // Return true for normal processing of tap keycode
case LT(0,DE_Y): case LT(_BASE,DE_Y):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_PIPE); tap_code16(DE_PIPE);
return false; return false;
} }
return true; return true;
case LT(0,KC_C): case LT(_BASE,KC_C):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_C)); tap_code16(LCTL(KC_C));
return false; return false;
} }
return true; return true;
case LT(0,KC_V): case LT(_BASE,KC_V):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(LCTL(KC_V)); tap_code16(LCTL(KC_V));
return false; return false;
} }
return true; return true;
case LT(0,KC_Q): case LT(_BASE,KC_Q):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_Q)); tap_code16(RALT(KC_Q));
return false; return false;
} }
return true; return true;
case LT(0,KC_F): case LT(_BASE,KC_F):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(RALT(KC_E)); tap_code16(RALT(KC_E));
return false; return false;
} }
return true; return true;
case LT(0,KC_A): case LT(_BASE,KC_A):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ADIA); tap_code16(DE_ADIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_O): case LT(_BASE,KC_O):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_ODIA); tap_code16(DE_ODIA);
return false; return false;
} }
return true; return true;
case LT(0,KC_U): case LT(_BASE,KC_U):
if (!record->tap.count && record->event.pressed) { if (!record->tap.count && record->event.pressed) {
tap_code16(DE_UDIA); tap_code16(DE_UDIA);
return false; return false;