From 254f4e66ada5d30f25facdbbdbb5821d0a17d7ce Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Tue, 27 Aug 2024 12:21:54 +0200 Subject: [PATCH] add my keymap --- crkbd/config.h | 3 ++- crkbd/keymap.c | 69 +++++++++++++++----------------------------------- crkbd/rules.mk | 6 +++++ 3 files changed, 29 insertions(+), 49 deletions(-) create mode 100644 crkbd/rules.mk diff --git a/crkbd/config.h b/crkbd/config.h index 9d4be81..970f7c4 100644 --- a/crkbd/config.h +++ b/crkbd/config.h @@ -20,7 +20,8 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C +// our shared config parts +#include "/home/cullmann/data/qmk/christoph-cullmann/common/config.h" /* Select hand configuration */ diff --git a/crkbd/keymap.c b/crkbd/keymap.c index e46743a..d6cae2d 100644 --- a/crkbd/keymap.c +++ b/crkbd/keymap.c @@ -18,53 +18,26 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT - //`--------------------------' `--------------------------' +// Returns true if `pos` on the left hand of the keyboard, false if right. +static bool on_left_hand(keypos_t pos) +{ + return pos.row < MATRIX_ROWS / 2; +} - ), +// layout helper macro, we just use 42 keys +#undef LAYOUT +#define LAYOUT(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11,\ +K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23,\ +K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35,\ + K36, K37, K38, K39, K40, K41\ +)\ +LAYOUT_split_3x6_3(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11,\ +K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23,\ +K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35,\ + K36, K37, K38, K39, K40, K41\ +) - [1] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, MO(3), KC_RALT - //`--------------------------' `--------------------------' - ), - - [2] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(3), KC_SPC, KC_ENT, _______, KC_RALT - //`--------------------------' `--------------------------' - ), - - [3] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT - //`--------------------------' `--------------------------' - ) -}; +// our shared 42 keys keymap +#include "../common/keymap.h" diff --git a/crkbd/rules.mk b/crkbd/rules.mk new file mode 100644 index 0000000..afa0b4c --- /dev/null +++ b/crkbd/rules.mk @@ -0,0 +1,6 @@ +# include common settings +include /home/cullmann/data/qmk/christoph-cullmann/common/rules.mk + +# build +# qmk compile -kb crkbd -km christoph-cullmann +# qmk flash -kb crkbd -km christoph-cullmann