use generic name for base layer

remove not used keymap
This commit is contained in:
Christoph Cullmann 2023-08-12 22:24:54 +02:00
parent 8e83da0c04
commit 7aad7832ff
6 changed files with 7 additions and 394 deletions

View file

@ -16,7 +16,7 @@
// our layers
enum my_layers {
_QWERTY,
_BASE,
_SYM,
_NUM,
_FN,
@ -27,7 +27,7 @@ enum my_layers {
// our keymap
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
[_BASE] = LAYOUT(
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, OSL(_MAGIC), KC_U, KC_QUOT,
RALT_T(KC_C) , LALT_T(KC_R), LCTL_T(KC_S) , LSFT_T(KC_T) , LGUI_T(KC_G), RGUI_T(KC_M), RSFT_T(KC_N), RCTL_T(KC_O), LALT_T(KC_I) , RALT_T(KC_A),
KC_Q , KC_J, KC_V , KC_D , KC_K, KC_X, KC_H , KC_SLSH , KC_COMM, KC_DOT ,

View file

@ -48,7 +48,7 @@ static bool my_on_left_hand(keypos_t pos)
* ----------------------------------
*/
const rgblight_segment_t PROGMEM qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS(
const rgblight_segment_t PROGMEM base_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 9, HSV_WHITE}
);
@ -73,7 +73,7 @@ const rgblight_segment_t PROGMEM magic_layer[] = RGBLIGHT_LAYER_SEGMENTS(
);
const rgblight_segment_t * const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
[_QWERTY] = qwerty_layer,
[_BASE] = base_layer,
[_SYM] = sym_layer,
[_NUM] = num_layer,
[_FN] = fn_layer,
@ -88,7 +88,7 @@ void keyboard_post_init_user(void) {
layer_state_t layer_state_set_user(layer_state_t state)
{
rgblight_set_layer_state(_QWERTY, layer_state_cmp(state, _QWERTY));
rgblight_set_layer_state(_BASE, layer_state_cmp(state, _BASE));
rgblight_set_layer_state(_SYM, layer_state_cmp(state, _SYM));
rgblight_set_layer_state(_NUM, layer_state_cmp(state, _NUM));
rgblight_set_layer_state(_FN, layer_state_cmp(state, _FN));

View file

@ -25,7 +25,7 @@
// └─────────────────────────────────────────────────┘
enum my_layers {
_QWERTY,
_BASE,
_SYM,
_NUM,
_FN,
@ -39,7 +39,7 @@ enum my_layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
[_BASE] = LAYOUT(
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
RALT_T(KC_C) , LALT_T(KC_R), LCTL_T(KC_S) , LSFT_T(KC_T) , LGUI_T(KC_G), RGUI_T(KC_M), RSFT_T(KC_N), RCTL_T(KC_E), LALT_T(KC_I) , RALT_T(KC_A),
KC_LSFT, KC_Q , KC_J, KC_V , KC_D , KC_K, KC_X, KC_H , KC_SLSH , KC_COMM, KC_DOT ,KC_RSFT,

View file

@ -1,32 +0,0 @@
#pragma once
/* The way how "handedness" is decided (which half is which),
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
for more options.
*/
#define MASTER_LEFT
// #define MASTER_RIGHT
//#define TAPPING_TERM 170
#define TAPPING_TERM 170
// Prevent normal rollover on alphas from accidentally triggering mods.
#define IGNORE_MOD_TAP_INTERRUPT
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define TAPPING_FORCE_HOLD
// Auto Shift
#define NO_AUTO_SHIFT_ALPHA
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
#define AUTO_SHIFT_NO_SETUP
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
#define NO_ACTION_ONESHOT
//#define NO_ACTION_TAPPING
//#define NO_MUSIC_MODE
#define COMBO_COUNT 1

View file

@ -1,352 +0,0 @@
/*
*/
#include QMK_KEYBOARD_H
#include <stdio.h>
#include "totem.h"
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ D E F I N I T I O N S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e l a y e r s │
// └─────────────────────────────────────────────────┘
enum totem_layers {
_COLEMAK,
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e k e y c o d e s │
// └─────────────────────────────────────────────────┘
enum custom_keycodes {
COLEMAK = SAFE_RANGE,
QWERTY,
LOWER,
RAISE,
ADJUST,
OS_SWAP,
WMAIL,
GIPHY,
MAKE_H,
SNAP
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e m a c r o n a m e s │
// └─────────────────────────────────────────────────┘
// LEFT HAND HOME ROW MODS ├───────────────────────────────────┐
#define GUI_A MT(MOD_LGUI, KC_A)
#define ALT_R MT(MOD_LALT, KC_R)
#define CTL_S MT(MOD_LCTL, KC_S)
#define SHT_T MT(MOD_LSFT, KC_T)
// RIGHT HAND HOME ROW MODS ├───────────────────────────────────┐
#define SHT_N MT(MOD_RSFT, KC_N)
#define CTL_E MT(MOD_LCTL, KC_E)
#define ALT_I MT(MOD_LALT, KC_I)
#define GUI_O MT(MOD_LGUI, KC_O)
#define LOWER LT(_LOWER, KC_TAB)
#define RAISE LT(_RAISE, KC_ESC)
#define ADJUST MO(_ADJUST)
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e c o m b o s │
// └─────────────────────────────────────────────────┘
const uint16_t PROGMEM esc_combo[] = {KC_TAB, KC_Q, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
COMBO(esc_combo, KC_ESC)
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e k e y o v e r r i d e s │
// └─────────────────────────────────────────────────┘
const key_override_t sve_key_override = ko_make_basic(MOD_MASK_GUI, KC_S, C(KC_S));
// This globally defines all key overrides to be used ├───────────┐
const key_override_t **key_overrides = (const key_override_t *[]){
&sve_key_override,
NULL // Null terminate the array of overrides!
};
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ K E Y M A P S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
c o l e m a k
Q W F P G J L U Y ;
A R S T D H N E I O
Q Z X C V B K M , . / \
DEL LOWER SPACE ENTER RAISE BSPC
*/
[_COLEMAK] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
q w e r t y
Q W E R T Y U I O P
A S D F G H J K L ;
SHIFT Z X C V B N M , . / \
CTRL LOWER SPACE ENTER RAISE BSPC
*/
[_QWERTY] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
l o w e r
CAPSLCK NUMLCK = { } 7 8 9 +
HOME [ ] 4 5 6 -
SCRNSHT END PG SAVE PG ( ) 1 2 3 *
ADJUST 0
*/
[_LOWER] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_CAPS, KC_NUM, KC_UP, KC_EQL, KC_LCBR, KC_RCBR, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_QUOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_MINS,
SNAP, KC_END, KC_PGUP, C(KC_S), KC_PGDN, KC_LPRN, KC_RPRN, KC_P1, KC_P2, KC_P3, KC_PAST, _______,
_______, _______, _______, _______, ADJUST, KC_P0
),
/*
r a i s e
! @ # $ % ^ & Ü ° /
Ä è SZ é ¥ £ Ö
WEB ` ~ CUE DM REC1 DM STOP DM PLY1
GIPHY ADJUST
*/
[_RAISE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, RALT(KC_U),RALT(KC_3),KC_BSLS,
RALT(KC_A),RALT(KC_F),RALT(KC_S),RALT(KC_G),XXXXXXX, XXXXXXX,LSFT(RALT(KC_4)),RALT(KC_5), RALT(KC_4), RALT(KC_O),
WMAIL, LSFT(KC_GRV),KC_TILD, RALT(KC_C),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_REC1, DM_RSTP, DM_PLY1,
GIPHY, ADJUST, _______, _______, _______, _______
),
/*
a d j u s t
RESET F7 F8 F9 F12
DEBUG QWERTY F4 F5 F6 F11
MAKE OS SWAP COLEMAK F1 F2 F3 F10 F13
*/
[_ADJUST] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12,
DB_TOGG, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11,
MAKE_H, OS_SWAP, COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10, KC_F13,
_______, _______, _______, _______, _______, _______
)
/*
t e m p l a t e
[_TEMPLATE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
),
*/
};
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ M A C R O S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case OS_SWAP:
if (record->event.pressed) {
if (!keymap_config.swap_lctl_lgui) {
keymap_config.swap_lctl_lgui = true; // ─── MAC
}
else {
keymap_config.swap_lctl_lgui = false; // ─── WIN
}
eeconfig_update_keymap(keymap_config.raw);
clear_keyboard(); // ──── clear to prevent stuck keys
return false;
}
// ┌─────────────────────────────────────────────────┐
// │ l a y e r │
// └─────────────────────────────────────────────────┘
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
// ┌─────────────────────────────────────────────────┐
// │ q m k │
// └─────────────────────────────────────────────────┘
case MAKE_H:
if (record->event.pressed) {
SEND_STRING ("qmk compile -kb totem -km geist");
tap_code(KC_ENTER);
}
break;
// ┌─────────────────────────────────────────────────┐
// │ p r o d u c t i v i t y │
// └─────────────────────────────────────────────────┘
case WMAIL:
if (record->event.pressed) {
SEND_STRING ("igit.igit@web.de");
}
break;
case GMAIL:
if (record->event.pressed) {
SEND_STRING ("igit@gmx.de");
}
break;
case GIPHY:
if (record->event.pressed) {
SEND_STRING ("@gif ");
}
break;
case SNAP:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
SEND_STRING(SS_LSFT(SS_LCMD(SS_LCTL("4")))); //MAC
} else {
SEND_STRING(SS_LSFT(SS_LWIN("S"))); //WIN
}
}
break;
}
return true;
}
/*
*/

View file

@ -1,3 +0,0 @@
DYNAMIC_MACRO_ENABLE = yes
COMBO_ENABLE = yes
KEY_OVERRIDE_ENABLE = yes