From 285a94a7bd9184e411c67794ef99e8a10591537c Mon Sep 17 00:00:00 2001 From: sajenim Date: Wed, 12 Apr 2023 15:36:21 +0800 Subject: [PATCH] setup gaming layers --- keyboards/crkbd/keymaps/sajenim/combos.def | 2 ++ keyboards/crkbd/keymaps/sajenim/keymap.c | 24 +++++++++++++++++++ keyboards/crkbd/keymaps/sajenim/layers.h | 2 ++ .../crkbd/keymaps/sajenim/process_record.h | 4 ++++ 4 files changed, 32 insertions(+) diff --git a/keyboards/crkbd/keymaps/sajenim/combos.def b/keyboards/crkbd/keymaps/sajenim/combos.def index 81ca76c..f4c6385 100644 --- a/keyboards/crkbd/keymaps/sajenim/combos.def +++ b/keyboards/crkbd/keymaps/sajenim/combos.def @@ -2,9 +2,11 @@ COMB(DF_TAB, KC_TAB, KC_D, KC_F) COMB(JK_ESC, KC_ESC, KC_J, KC_K) COMB(DK_CAPS, CW_TOGG, KC_D, KC_K) +COMB(OP_GAME, GM_TOGG, KC_O, KC_P) SUBS(RT_HOME, "~/", KC_R, KC_T) SUBS(YU_UPDIR, "../", KC_Y, KC_U) + // name result chord keys SUBS(VI_WRITE, ":w", KC_SCLN, KC_W ) SUBS(VI_QUIT, ":q", KC_SCLN, KC_Q ) diff --git a/keyboards/crkbd/keymaps/sajenim/keymap.c b/keyboards/crkbd/keymaps/sajenim/keymap.c index 143b0f1..a7de1ab 100644 --- a/keyboards/crkbd/keymaps/sajenim/keymap.c +++ b/keyboards/crkbd/keymaps/sajenim/keymap.c @@ -95,6 +95,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX //`--------------------------' `--------------------------' ), + + [L_GAMING] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, 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_RSFT, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, GAME_FN, KC_SPC, KC_ENT, XXXXXXX, XXXXXXX + //`--------------------------' `--------------------------' + ), + + [L_GAMEFN] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_0, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`--------------------------' `--------------------------' + ), }; diff --git a/keyboards/crkbd/keymaps/sajenim/layers.h b/keyboards/crkbd/keymaps/sajenim/layers.h index 666480f..02d4f83 100644 --- a/keyboards/crkbd/keymaps/sajenim/layers.h +++ b/keyboards/crkbd/keymaps/sajenim/layers.h @@ -6,5 +6,7 @@ enum layers { L_LOWER, L_RAISE, L_ADJUST, + L_GAMING, + L_GAMEFN, }; diff --git a/keyboards/crkbd/keymaps/sajenim/process_record.h b/keyboards/crkbd/keymaps/sajenim/process_record.h index 1cc5c69..51ad677 100644 --- a/keyboards/crkbd/keymaps/sajenim/process_record.h +++ b/keyboards/crkbd/keymaps/sajenim/process_record.h @@ -37,6 +37,10 @@ enum custom_keycodes { #define WZ_CMOD LCTL(LSFT(KC_X)) #define WZ_PSTE LCTL(LSFT(KC_V)) +// Gaming +#define GM_TOGG TG(L_GAMING) +#define GAME_FN MO(L_GAMEFN) + // Misc #define TABCTRL MT(MOD_LCTL, KC_TAB) #define BSPC_DW MT(MOD_LCTL, KC_BSPC)