Skip to content

Commit

Permalink
Remove duplicated layers to avoid MOs on left hand
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cardoso committed Aug 12, 2021
1 parent fc618a3 commit ea28e92
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 77 deletions.
84 changes: 14 additions & 70 deletions keyboards/kinesis/keymaps/cadusk/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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(
Expand All @@ -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
),

/*
Expand All @@ -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(
Expand All @@ -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
),

/*
Expand Down Expand Up @@ -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
,--------------------------------------------------------------. ,--------------------------------------------------------------.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
14 changes: 7 additions & 7 deletions keyboards/kinesis/keymaps/cadusk/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
`--------------------------' `--------------------------'
```

Expand All @@ -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 |
`--------------------------' `--------------------------'
```

Expand Down Expand Up @@ -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

```
Expand Down

0 comments on commit ea28e92

Please sign in to comment.