diff options
Diffstat (limited to 'keyboards/ergodox/keymaps/kastyle/keymap.c')
| -rw-r--r-- | keyboards/ergodox/keymaps/kastyle/keymap.c | 77 |
1 files changed, 41 insertions, 36 deletions
diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c index a92085003..467996686 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/keyboards/ergodox/keymaps/kastyle/keymap.c | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | /* Setup to approximate a Kinesis Advantage with an eye to use in a | ||
| 2 | * Mac/OSX environment | ||
| 3 | * This version adds a hand swap feature to flip the keyboard */ | ||
| 1 | #include "ergodox.h" | 4 | #include "ergodox.h" |
| 2 | #include "debug.h" | 5 | #include "debug.h" |
| 3 | #include "action_layer.h" | 6 | #include "action_layer.h" |
| @@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 18 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| | 21 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| |
| 19 | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | | 22 | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | |
| 20 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | 23 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' |
| 21 | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | | 24 | * |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1| |
| 22 | * `----------------------------------' `----------------------------------' | 25 | * `----------------------------------' `----------------------------------' |
| 23 | * ,---------------. ,---------------. | 26 | * ,---------------. ,---------------. |
| 24 | * |Ctrl/Esc| Alt | | Alt |Ctrl/Esc| | 27 | * | LGUI |Al/Esc| |Al/Esc| RGUI | |
| 25 | * ,------|--------|------| |------+--------+------. | 28 | * ,------|--------|------| |------+--------+------. |
| 26 | * | | | Home | | PgUp | | | | 29 | * | | | Home | | PgUp | | | |
| 27 | * |Backsp| Del |------| |------| Enter | Space| | 30 | * |Backsp| Del |------| |------| Enter | Space| |
| @@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 31 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | 34 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. |
| 32 | // Otherwise, it needs KC_* | 35 | // Otherwise, it needs KC_* |
| 33 | [BASE] = KEYMAP( // layer 0 : default | 36 | [BASE] = KEYMAP( // layer 0 : default |
| 34 | // left hand | 37 | // left hand |
| 35 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, | 38 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, |
| 36 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), | 39 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), |
| 37 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, | 40 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, |
| 38 | KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), | 41 | KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), |
| 39 | LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, | 42 | KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, |
| 40 | CTL_T(KC_ESC), ALT_T(KC_APP), | 43 | KC_LGUI, ALT_T(KC_ESC), |
| 41 | KC_HOME, | 44 | KC_HOME, |
| 42 | KC_BSPC,KC_DEL,KC_END, | 45 | KC_BSPC, KC_DEL, KC_END, |
| 43 | // right hand | 46 | // right hand |
| 44 | KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | 47 | KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, |
| 45 | TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | 48 | TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, |
| 46 | KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, | 49 | KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, |
| 47 | MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, | 50 | MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, |
| 48 | KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, | 51 | KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, |
| 49 | KC_LALT, CTL_T(KC_ESC), | 52 | ALT_T(KC_ESC), KC_RGUI, |
| 50 | KC_PGUP, | 53 | KC_PGUP, |
| 51 | KC_PGDN,KC_ENT, KC_SPC | 54 | KC_PGDN, KC_ENT, KC_SPC |
| 52 | ), | 55 | ), |
| 56 | |||
| 53 | /* Keymap 1: Symbol Layer | 57 | /* Keymap 1: Symbol Layer |
| 54 | * | 58 | * |
| 55 | * ,--------------------------------------------------. ,--------------------------------------------------. | 59 | * ,--------------------------------------------------. ,--------------------------------------------------. |
| 56 | * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | | 60 | * | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | |
| 57 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | 61 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| |
| 58 | * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | | 62 | * | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | |
| 59 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 63 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| 60 | * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | | 64 | * | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | |
| 61 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 65 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| 62 | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | | 66 | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | |
| 63 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | 67 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' |
| @@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 74 | // SYMBOLS | 78 | // SYMBOLS |
| 75 | [SYMB] = KEYMAP( | 79 | [SYMB] = KEYMAP( |
| 76 | // left hand | 80 | // left hand |
| 77 | KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, | 81 | KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, |
| 78 | KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, | 82 | KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, |
| 79 | KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, | 83 | KC_PAUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, |
| 80 | KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, | 84 | KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, |
| 81 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | 85 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 82 | KC_TRNS,KC_TRNS, | 86 | KC_TRNS, KC_TRNS, |
| 83 | KC_TRNS, | 87 | KC_TRNS, |
| 84 | KC_TRNS,KC_TRNS,KC_TRNS, | 88 | KC_TRNS, KC_TRNS, KC_TRNS, |
| 85 | // right hand | 89 | // right hand |
| 86 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | 90 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, |
| 87 | KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, | 91 | KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, |
| @@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 92 | KC_TRNS, | 96 | KC_TRNS, |
| 93 | KC_TRNS, KC_TRNS, KC_TRNS | 97 | KC_TRNS, KC_TRNS, KC_TRNS |
| 94 | ), | 98 | ), |
| 99 | |||
| 95 | /* Keymap 2: Media and mouse keys | 100 | /* Keymap 2: Media and mouse keys |
| 96 | * | 101 | * |
| 97 | * ,--------------------------------------------------. ,--------------------------------------------------. | 102 | * ,--------------------------------------------------. ,--------------------------------------------------. |
| @@ -135,10 +140,6 @@ KEYMAP( | |||
| 135 | ), | 140 | ), |
| 136 | }; | 141 | }; |
| 137 | 142 | ||
| 138 | const uint16_t PROGMEM fn_actions[] = { | ||
| 139 | [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) | ||
| 140 | }; | ||
| 141 | |||
| 142 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 143 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
| 143 | { | 144 | { |
| 144 | // MACRODOWN only works in this function | 145 | // MACRODOWN only works in this function |
| @@ -154,6 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 154 | return MACRO_NONE; | 155 | return MACRO_NONE; |
| 155 | }; | 156 | }; |
| 156 | 157 | ||
| 158 | const uint16_t PROGMEM fn_actions[] = { | ||
| 159 | [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands | ||
| 160 | }; | ||
| 161 | |||
| 157 | // Runs just one time when the keyboard initializes. | 162 | // Runs just one time when the keyboard initializes. |
| 158 | void matrix_init_user(void) { | 163 | void matrix_init_user(void) { |
| 159 | 164 | ||
