From f8e4f7ea80a1e94a6e205f9bc790fc2f3a4a2ce3 Mon Sep 17 00:00:00 2001 From: "Manassarn \"Noom\" Manoonchai" Date: Thu, 26 Sep 2019 02:57:49 +0700 Subject: [PATCH] [Keymap] Add Z-layer to narze layouts (#6806) * Revert raise/backspace mod tap to just backspace * Add Dev layer * Use Dev layer on holding z key * Add Dev layer for Ergodox --- .../ergodox_infinity/keymaps/narze/keymap.c | 58 ++++++++++++++++--- keyboards/planck/keymaps/narze/keymap.c | 42 ++++++++++---- 2 files changed, 82 insertions(+), 18 deletions(-) diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index 238fcb8f9..4a4e8ab94 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -14,6 +14,7 @@ enum ergodox_layers { _PLOVER, // Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) _SUPERDUPER, + _DEV, _MOUSE, _ADJUST, _MDIA, @@ -28,6 +29,7 @@ enum ergodox_keycodes { RAISE, PLOVER, SUPERDUPER, + DEV, MOUSE, BACKLIT, EXT_PLV, @@ -60,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Hp/Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | Sft/( | Z/Mo | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | + * | Sft/( | Z/Dv | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | * `----------------------------------' `----------------------------------' @@ -77,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, LT(_SYMB, KC_NO), HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_ENT, KC_LGUI, KC_HOME, @@ -87,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - LT(_RAISE, KC_BSPC), KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -101,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Hp/Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | Sft/( | Z/Mo | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | + * | Sft/( | Z/Dv | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | * `----------------------------------' `----------------------------------' @@ -118,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SYMB, KC_NO), HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, - SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_ENT, KC_LGUI, KC_HOME, @@ -128,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - LT(_RAISE, KC_BSPC), KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -149,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_SYMB, KC_NO), CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSLS, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, MEH_T(KC_NO),CM_N, CM_M, CM_COMM,CM_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, - LT(_RAISE, KC_BSPC), KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), + RAISE, KC_BSPC,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_BSPC, KC_ENT @@ -319,6 +321,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______, KC_LSFT ), +/* Dev Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | - | + | ( | ) | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| _ | [ | ] | { | } | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | = | | | < | > | ? | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_DEV] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), _______, + S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), _______, + _______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, _______ + ), + /* Mouse * * ,--------------------------------------------------. ,--------------------------------------------------. diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index bfff5d9a1..c878cf9e4 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -15,6 +15,7 @@ enum planck_layers { _RAISE, _PLOVER, _SUPERDUPER, + _DEV, _MOUSE, _ADJUST }; @@ -25,6 +26,7 @@ enum planck_keycodes { QWOC, PLOVER, SUPERDUPER, + DEV, MOUSE, LOWER, RAISE, @@ -51,42 +53,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Hp/Ec| A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Sft/(| Z/Mo | X | C | V | B | N | M | , | . | SD-/ |Sft/Ent| + * | Sft/(| Z/Dv | X | C | V | B | N | M | , | . | SD-/ |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Rse/[| Ctrl | Alt | GUI/_|Lower | Space | ^/Bs | Bksp | Alt | Ctrl | Low/]| + * | Rse/[| Ctrl | Alt | GUI/_|Lower | Space | Raise| Bksp | Alt | Ctrl | Low/]| * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LSFT_LPRN, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, - LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, LT(_RAISE, KC_BSPC), KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) + LSFT_LPRN, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) ), /* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Hp/Ec| A | R | S | T | D | H | N | E | I | O | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Sft/(| Z/Mo | X | C | V | B | K | M | , | . | SD-/ |Sft/Ent| + * | Sft/(| Z/Dv | X | C | V | B | K | M | , | . | SD-/ |Sft/Ent| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI/_|Lower | Space | ^/Bs | Bksp | Alt | Ctrl | Low/]| + * | Brite| Ctrl | Alt | GUI/_|Lower | Space | Raise| Bksp | Alt | Ctrl | Low/]| * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - LSFT_LPRN, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, - LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, LT(_RAISE, KC_BSPC), KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) + LSFT_LPRN, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) ), /* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */ [_QWOC] = LAYOUT_planck_grid( KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_MINS, HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, - LSFT_LPRN, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, LT(_SUPERDUPER, CM_SLSH), SFT_ENT, - LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, LT(_RAISE, KC_BSPC), KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) + LSFT_LPRN, LT(_DEV, KC_Z), CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, LT(_SUPERDUPER, CM_SLSH), SFT_ENT, + LT(_RAISE, KC_LBRC), KC_LCTL, KC_LALT, GUI_UNDS, LOWER, KC_SPC, KC_SPC, RAISE, KC_BSPC, KC_RALT, KC_RCTL, LT(_LOWER, KC_RBRC) ), /* Lower @@ -162,6 +164,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______ ), +/* Dev Layer + * /-----------------------------------------------------------------------------------\ + * | | | | | | | | - | + | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | _ | [ | ] | { | } | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | = | | | < | > | ? | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | + * \-----------------------------------------------------------------------------------/ + */ +[_DEV] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), _______, + _______, _______, _______, _______, _______, _______, S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), _______, + _______, _______, _______, _______, _______, _______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + /* Mouse * /-----------------------------------------------------------------------------------\ * | | | S↑ | M↑ | S↓ | | | | S↑ | S↓ | | |