From ea28e925bfc1a8e429e722e486a181168a8ec32d Mon Sep 17 00:00:00 2001 From: Carlos Cardoso Date: Wed, 11 Aug 2021 21:49:42 -0400 Subject: [PATCH] Remove duplicated layers to avoid MOs on left hand --- keyboards/kinesis/keymaps/cadusk/keymap.c | 84 ++++------------------ keyboards/kinesis/keymaps/cadusk/readme.md | 14 ++-- 2 files changed, 21 insertions(+), 77 deletions(-) diff --git a/keyboards/kinesis/keymaps/cadusk/keymap.c b/keyboards/kinesis/keymaps/cadusk/keymap.c index 359ffcb34aea..635f276af5a1 100644 --- a/keyboards/kinesis/keymaps/cadusk/keymap.c +++ b/keyboards/kinesis/keymaps/cadusk/keymap.c @@ -6,12 +6,9 @@ enum kinesis_layers { _QWERTY, // QWERTY (default layer) _COLEMAK, // Colemak _NUMBERS, // Numbers & Symbols - _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) _FUNCTION, // Function - _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) _NUMPAD, // Numpad - _ADJUST, // Adjust layer (accessed via tri-layer feature) - _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) + _ADJUST // Adjust layer (accessed via tri-layer feature) }; enum kinesis_keycodes { @@ -32,18 +29,6 @@ enum { PSPA }; -void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - layer_on(_ADJUST2); - set_oneshot_layer(_ADJUST2, ONESHOT_START); - } -} -void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - layer_off(_ADJUST2); - clear_oneshot_layer_state(ONESHOT_PRESSED); - } -} qk_tap_dance_action_t tap_dance_actions[] = { [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap @@ -59,11 +44,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { //Aliases for longer keycodes #define NUMPAD TG(_NUMPAD) -#define ADJUST MO(_ADJUST2) +#define ADJUST MO(_ADJUST) #define SPCFN LT(_FUNCTION, KC_SPC) -#define BSPCFN LT(_FUNCTION2, KC_BSPC) #define ENTNS LT(_NUMBERS, KC_ENT) -#define GUINS LT(_NUMBERS2, KC_LGUI) #define CTLESC CTL_T(KC_ESC) #define CTL_A LCTL(KC_A) #define CTL_C LCTL(KC_C) @@ -102,9 +85,9 @@ QWERTY ,-----------------. ,-----------------. | ESC/Ctl| LAlt | | RAlt | RCtl | ,--------+--------+--------| |--------+--------+--------. - | Bspc | LGUI | Del | | App | Enter | Space | - | / | / |--------| |--------| / | / | - | Fn | Number | Home | | End | Number2| Fn2 | + | | | Del | | App | Enter | Space | + | Bscp | LGUI |--------| |--------| / | / | + | | | Home | | End | Number | Fn | `--------------------------' `--------------------------' */ [_QWERTY] = LAYOUT_pretty( @@ -114,9 +97,9 @@ QWERTY CTLESC, 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, KC_GRV, KC_INS, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - CTLESC, KC_LALT, KC_RALT, KC_RCTL, - KC_DEL, KC_APP, - BSPCFN, GUINS, KC_HOME, KC_END, ENTNS, SPCFN + CTLESC, KC_LALT, KC_RALT, KC_RCTL, + KC_DEL, KC_APP, + KC_BSPC, KC_LGUI, KC_HOME, KC_END, ENTNS, SPCFN ), /* @@ -139,9 +122,9 @@ Colemak ,-----------------. ,-----------------. | ESC/Ctl| LAlt | | RAlt | RCtl | ,--------+--------+--------| |--------+--------+--------. - | Bspc | LGUI | Del | | App | Enter | Space | - | / | / |--------| |--------| / | / | - | Fn | Number | Home | | End | Number2| Fn2 | + | | | Del | | App | Enter | Space | + | Bscp | LGUI |--------| |--------| / | / | + | | | Home | | End | Number | Fn | `--------------------------' `--------------------------' */ [_COLEMAK] = LAYOUT_pretty( @@ -151,9 +134,9 @@ Colemak CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_GRV, KC_INS, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - CTLESC, KC_LALT, KC_RALT, KC_RCTL, - KC_DEL, KC_APP, - BSPCFN, GUINS, KC_HOME, KC_END, ENTNS, SPCFN + CTLESC, KC_LALT, KC_RALT, KC_RCTL, + KC_DEL, KC_APP, + KC_BSPC, KC_LGUI, KC_HOME, KC_END, ENTNS, SPCFN ), /* @@ -193,18 +176,6 @@ Numbers/Symbols layer _______, _______, _______, _______, _______, _______ ), -[_NUMBERS2] = LAYOUT_pretty( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, - _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, - KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ -), - /* Function layer ,--------------------------------------------------------------. ,--------------------------------------------------------------. @@ -241,18 +212,6 @@ Function layer _______, _______, _______, _______, _______, _______ ), -[_FUNCTION2] = LAYOUT_pretty( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, - _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, - _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, - _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ -), - /* Numpad layer (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) @@ -327,23 +286,8 @@ Adjust layer _______, _______, _______, _______, _______, _______ ), -[_ADJUST2] = LAYOUT_pretty( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, - _______, COLEMAK, QWERTY, _______, _______, NUMPAD, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ -) - }; -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); -} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/kinesis/keymaps/cadusk/readme.md b/keyboards/kinesis/keymaps/cadusk/readme.md index cc1057f8d423..51ac44fd1e96 100644 --- a/keyboards/kinesis/keymaps/cadusk/readme.md +++ b/keyboards/kinesis/keymaps/cadusk/readme.md @@ -70,9 +70,9 @@ I use QWERTY as my default layout. I've included Colemak here as well. ,-----------------. ,-----------------. | ESC/Ctl| Alt | | RAlt | RCtl | ,--------+--------+--------| |--------+--------+--------. - | Bspc | LGUI | Del | | App | Enter | Space | - | / | / |--------| |--------| / | / | - | Fn | Number | Home | | End | Number2| Fn2 | + | | | Del | | App | Enter | Space | + | Bspc | LGUI |--------| |--------| / | / | + | | | Home | | End | Number2| Fn2 | `--------------------------' `--------------------------' ``` @@ -94,9 +94,9 @@ I use QWERTY as my default layout. I've included Colemak here as well. ,-----------------. ,-----------------. | ESC/Ctl| Alt | | RAlt | RCtl | ,--------+--------+--------| |--------+--------+--------. - | Bspc | LGUI | Del | | App | Enter | Space | - | / | / |--------| |--------| / | / | - | Fn | Number | Home | | End | Number2| Fn2 | + | | | Del | | App | Enter | Space | + | Bspc | LGUI |--------| |--------| / | / | + | | | Home | | End | Number | Fn | `--------------------------' `--------------------------' ``` @@ -178,7 +178,7 @@ I use QWERTY as my default layout. I've included Colemak here as well. ### Adjust layer - Momentary layer -- Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access +- Press and hold Adjust key on the function row - Numpad on toggle ```