try my keymap

This commit is contained in:
Christoph Cullmann 2023-04-13 15:29:43 +02:00
parent 9b2b44d0ca
commit 7f1fe0dd80
No known key found for this signature in database
3 changed files with 45 additions and 290 deletions

View file

@ -1,29 +1,7 @@
#pragma once #pragma once
/* The way how "handedness" is decided (which half is which), /* The way how "handedness" is decided (which half is which),
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
for more options. for more options.
*/ */
#define MASTER_LEFT #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

View file

@ -12,7 +12,7 @@
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include <stdio.h>
#include "totem.h" #include "totem.h"
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ // ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
@ -25,69 +25,13 @@
// └─────────────────────────────────────────────────┘ // └─────────────────────────────────────────────────┘
enum totem_layers { enum totem_layers {
_QWERTY, _QWERTY,
_COLEMAK, _SYM,
_LOWER, _NUM,
_RAISE, _FN,
_ADJUST, _NAV
}; };
// ┌─────────────────────────────────────────────────┐
// │ 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,
MAKE_H,
SNAP
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e m a c r o n a m e s │
// └─────────────────────────────────────────────────┘
// LEFT HAND HOME ROW MODS QWERTY ├──────────────────┐
#define GUI_A MT(MOD_LGUI, KC_A)
#define ALT_S MT(MOD_LALT, KC_S)
#define CTL_D MT(MOD_LCTL, KC_D)
#define SHT_F MT(MOD_LSFT, KC_F)
// RIGHT HAND HOME ROW MODS QWERTY ├─────────────────┐
#define SHT_J MT(MOD_RSFT, KC_J)
#define CTL_K MT(MOD_LCTL, KC_K)
#define ALT_L MT(MOD_LALT, KC_L)
#define GUI_S MT(MOD_LGUI, KC_SCLN)
// LEFT HAND HOME ROW MODS COLEMAK ├─────────────────┐
#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 COLEMAK ├────────────────┐
#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)
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ // ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ K E Y M A P S │ // │ K E Y M A P S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ // └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@ -95,215 +39,43 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* [_QWERTY] = LAYOUT(
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
q w e r t y KC_C , KC_R , KC_S , KC_T , KC_G, KC_M, KC_N , KC_E , KC_I , 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,
MO(_NUM), KC_SPC, MO(_SYM), MO(_FN), KC_BSPC, MO(_NAV)
Q W E R T Y U I O P ),
A S D F G H J K L ;
Q Z X C V B N M , . / P
CTRL LOWER SPACE ENTER RAISE BSPC
*/
[_QWERTY] = LAYOUT( [_SYM] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ XXXXXXX, C(KC_X), C(KC_C), C(KC_V), XXXXXXX, KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR,
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, OSM(MOD_LGUI), OSM(MOD_LALT), OSM(MOD_LCTL), OSM(MOD_LSFT), OSM(MOD_RALT), KC_PLUS, KC_DLR, KC_PERC, KC_CIRC, KC_COLN,
GUI_A, ALT_S, CTL_D, SHT_F, KC_G, KC_H, SHT_J, CTL_K, ALT_L, GUI_S, KC_LSFT, XXXXXXX, XXXXXXX, KC_LGUI, KC_RALT, XXXXXXX, KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_TILD,KC_RSFT,
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_P, XXXXXXX, KC_TAB, KC_SPC, KC_UNDS, KC_RPRN, XXXXXXX
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC ),
),
/* [_NUM] = LAYOUT(
XXXXXXX, C(KC_X), C(KC_C), C(KC_V), XXXXXXX, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC,
OSM(MOD_LGUI), OSM(MOD_LALT), OSM(MOD_LCTL), OSM(MOD_LSFT), OSM(MOD_RALT), KC_EQL, KC_4, KC_5, KC_6, KC_SCLN,
KC_LSFT, XXXXXXX, XXXXXXX, KC_LGUI, KC_RALT, XXXXXXX, KC_BSLS, KC_1, KC_2, KC_3, KC_GRV,KC_RSFT,
XXXXXXX, KC_TAB, KC_SPC, KC_MINS, KC_0, XXXXXXX
),
[_FN] = LAYOUT(
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_F11, KC_F4, KC_F5, KC_F6, KC_DEL, OSM(MOD_RALT), OSM(MOD_RSFT), OSM(MOD_RCTL), OSM(MOD_LALT), OSM(MOD_RGUI),
KC_LSFT, KC_F10, KC_F1, KC_F2, KC_F3, KC_INS, XXXXXXX, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX,KC_RSFT,
KC_TAB, KC_ENT, KC_ESC, KC_ENT, KC_BSPC, XXXXXXX
),
[_NAV] = LAYOUT(
c o l e m a k XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, OSM(MOD_RALT), OSM(MOD_RSFT), OSM(MOD_RCTL), OSM(MOD_LALT), OSM(MOD_RGUI),
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX,KC_RSFT,
Q W F P G J L U Y ; KC_TAB, KC_ENT, KC_ESC, KC_ENT, KC_BSPC, XXXXXXX
)
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_SCLN,
KC_DEL, 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 é ¥ £ Ö
` ~ 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),
XXXXXXX, LSFT(KC_GRV),KC_TILD, RALT(KC_C),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_REC1, DM_RSTP, DM_PLY1,
_______, 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 default");
tap_code(KC_ENTER);
}
break;
// ┌─────────────────────────────────────────────────┐
// │ p r o d u c t i v i t y │
// └─────────────────────────────────────────────────┘
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 +1,6 @@
DYNAMIC_MACRO_ENABLE = yes # less debugging features
COMMAND_ENABLE = no
CONSOLE_ENABLE = no
# per key debounce: https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md
DEBOUNCE_TYPE = sym_defer_pk