diff options
| author | Reed <rmwphd@gmail.com> | 2020-06-29 13:23:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-29 10:23:13 -0700 |
| commit | 1baa99c6473473ba3204c9861951e70c10d037cb (patch) | |
| tree | 2f53db277340f411a690bef3127768007720062e /keyboards/kyria | |
| parent | e9e6054ee7eaca4cbd8d1c7566f394559ea8770a (diff) | |
| download | qmk_firmware-1baa99c6473473ba3204c9861951e70c10d037cb.tar.gz qmk_firmware-1baa99c6473473ba3204c9861951e70c10d037cb.zip | |
[Keymap] Adding my keymaps for ergodox_ez and kyria (#9365)
* Trying to fix problems in my kyria steez
* repeating last commit.....
* repeating last commit on EDIT layer but swapping direction
exit
* moving the reversed desktop moves to the symbol layers on the same hand, for easier activation
* adding mac desktop movement keys to Kyria layout
* Adding readmes to my keymaps
* Removing a png...
* Update keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c removing EPRM case
* Apply suggestions from code review
Great updates to various old-school or outdated ways I was doing things, removing some commented out code, etc.
* Apply suggestions from code review
Additional improvements
* Moving tapdances.cpp to userspace as tapdances.c
* reindenting the Kyria keymap to follow four-spaces convention, turning off oled on my kyria, improving the led handling on the Ergodox.
* updating led stuff on the other two versions of the keymap, removing EPRM key from main keymap
* Apply suggestions from code review
I'm adding these various removals to the config file because it seems that at this time those settings are in harmony with the ergodox_ez defaults.
* Moving encoder functions into their own userspace file
* Apply suggestions from code review
Removing settings that are now defaults, clearing out placeholder custom keycodes (smh)
* updating encoder functions.
* Moving to LAYOUT_stack for all layers, adding end of file newlines, switching to some shorter keycode aliases
* Okay, refactor is well underway.
* refactored! Also improved led handling for ergodox and rgb handling for kyria
* removing mac/windows swappable version because I don't feel like dealing with it when reflashing is so easy.
* moving LAYOUT_stack into kyria.h
* moving the alternate default layer down next to QWERTY
Diffstat (limited to 'keyboards/kyria')
| -rw-r--r-- | keyboards/kyria/keymaps/rmw/config.h | 36 | ||||
| -rw-r--r-- | keyboards/kyria/keymaps/rmw/keymap.c | 199 | ||||
| -rw-r--r-- | keyboards/kyria/keymaps/rmw/readme.md | 9 | ||||
| -rw-r--r-- | keyboards/kyria/keymaps/rmw/rules.mk | 4 | ||||
| -rw-r--r-- | keyboards/kyria/kyria.h | 22 |
5 files changed, 270 insertions, 0 deletions
diff --git a/keyboards/kyria/keymaps/rmw/config.h b/keyboards/kyria/keymaps/rmw/config.h new file mode 100644 index 000000000..02e5087b3 --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/config.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2019 Thomas Baart <thomas@splitkb.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #define MACOSX | ||
| 20 | |||
| 21 | #ifdef OLED_DRIVER_ENABLE | ||
| 22 | #define OLED_DISPLAY_128X64 | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #ifdef RGBLIGHT_ENABLE | ||
| 26 | #define RGBLIGHT_ANIMATIONS | ||
| 27 | #define RGBLIGHT_HUE_STEP 8 | ||
| 28 | #define RGBLIGHT_SAT_STEP 8 | ||
| 29 | #define RGBLIGHT_VAL_STEP 8 | ||
| 30 | #endif | ||
| 31 | |||
| 32 | // If you are using an Elite C rev3 on the follower side, uncomment the lines below: | ||
| 33 | // #define SPLIT_USB_DETECT | ||
| 34 | // #define NO_USB_STARTUP_CHECK | ||
| 35 | |||
| 36 | |||
diff --git a/keyboards/kyria/keymaps/rmw/keymap.c b/keyboards/kyria/keymaps/rmw/keymap.c new file mode 100644 index 000000000..bf0427238 --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/keymap.c | |||
| @@ -0,0 +1,199 @@ | |||
| 1 | /* Copyright 2019 Thomas Baart <thomas@splitkb.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | #include "rmw.h" | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [QWERTY] = LAYOUT_stack( | ||
| 22 | KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, | ||
| 23 | OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, | ||
| 24 | TD(FRBK2) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE, | ||
| 25 | TO(ADJUST), TD(SGCA), TD(AGC), KC_BSPACE, TD(SHNTC), | ||
| 26 | |||
| 27 | KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
| 28 | KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOT, | ||
| 29 | KC_DEL, TO(NUMPAD), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MS_BTN1, | ||
| 30 | SFTENT, KC_SPC, TD(GCA), TD(CTLALL), KC_CAPS | ||
| 31 | ), | ||
| 32 | |||
| 33 | [MINIMAK4] = LAYOUT_stack( | ||
| 34 | KC_TAB , KC_Q, KC_W, KC_D, KC_R, KC_K, | ||
| 35 | OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G, | ||
| 36 | OSM(MOD_LSFT) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE, | ||
| 37 | _______, TO(ADJUST), TD(SGCA), KC_BSPACE, TD(SHNTC), | ||
| 38 | |||
| 39 | KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, | ||
| 40 | KC_H, LT(JSYM,KC_J), KC_E, KC_L, LT(EDIT,KC_SCLN), KC_QUOT, | ||
| 41 | KC_DEL, TO(NUMPAD), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MINS, | ||
| 42 | SFTENT, KC_SPC, TD(GCA), TD(CTLALL), _______ | ||
| 43 | ), | ||
| 44 | |||
| 45 | [NUMPAD] = LAYOUT_stack( | ||
| 46 | _______, _______, _______, _______, _______, _______, | ||
| 47 | _______, _______, _______, _______, _______, _______, | ||
| 48 | _______, _______, _______, _______, _______, _______, TO(QWERTY), _______, | ||
| 49 | _______, _______, _______, _______ , _______, | ||
| 50 | |||
| 51 | _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, | ||
| 52 | _______, KC_4, KC_5, KC_6, KC_KP_PLUS , _______, | ||
| 53 | _______, TO(EDIT), _______, KC_1, KC_2, KC_3, KC_KP_SLASH, LCTL(KC_RIGHT), | ||
| 54 | _______, _______, KC_0, KC_DOT, _______ | ||
| 55 | ), | ||
| 56 | |||
| 57 | [EDIT] = LAYOUT_stack( | ||
| 58 | _______, TASK_MAN, _______, SELW_LEFT, SELW_RIGHT, _______, | ||
| 59 | _______, _______ , LGUI(KC_GRV), MVW_LEFT, MVW_RIGHT , _______, | ||
| 60 | LCTL(KC_LEFT), R_UNDO, R_CUT , R_COPY , R_PASTE, R_REDO , TO(NUMPAD), FORM_GET, | ||
| 61 | _______, _______, _______, DEL_WRD, _______, | ||
| 62 | |||
| 63 | NEW_TAB , KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, | ||
| 64 | R_HOME , KC_LEFT, KC_DOWN, KC_RIGHT, R_END, _______, | ||
| 65 | FORM_PUT, TO(QWERTY), SEL_HOME, S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), SEL_END, _______, | ||
| 66 | _______, _______, _______, _______, _______ | ||
| 67 | ), | ||
| 68 | |||
| 69 | [ADJUST] = LAYOUT_stack( | ||
| 70 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, | ||
| 71 | TO(QWERTY), TO(EDIT), TO(NUMPAD), TO(JSYM), TO(FSYM), TO(MEDIA), | ||
| 72 | DF(MINIMAK4), DF(QWERTY), RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, | ||
| 73 | _______, _______, _______, _______, _______, | ||
| 74 | |||
| 75 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 76 | _______, _______, _______, _______, _______, _______, | ||
| 77 | _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 78 | _______, _______, _______, _______, _______ | ||
| 79 | ), | ||
| 80 | |||
| 81 | [FSYM] = LAYOUT_stack( | ||
| 82 | _______, _______, _______, _______, _______, _______, | ||
| 83 | _______, _______, KC_TILD, KC_EXLM, _______, _______, | ||
| 84 | LCTL(KC_RIGHT), _______, TO(QWERTY), _______, _______, _______, _______, _______, | ||
| 85 | _______, _______, _______, _______, _______, | ||
| 86 | |||
| 87 | KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, | ||
| 88 | KC_EQUAL, KC_MINUS, KC_UNDS, KC_PIPE, KC_COLON, KC_DQT, | ||
| 89 | _______, _______, _______, KC_PLUS, KC_BSLS, KC_SLSH, _______, _______, | ||
| 90 | _______, _______, _______, _______, _______ | ||
| 91 | ), | ||
| 92 | |||
| 93 | [JSYM] = LAYOUT_stack( | ||
| 94 | _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, | ||
| 95 | _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, | ||
| 96 | _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, _______, | ||
| 97 | _______, _______, _______, _______, _______, | ||
| 98 | |||
| 99 | _______, _______, _______, _______, _______, _______, | ||
| 100 | _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, | ||
| 101 | _______, _______, _______, _______, _______, TO(QWERTY), _______, LCTL(KC_LEFT), | ||
| 102 | _______, _______, _______, _______, _______ | ||
| 103 | ), | ||
| 104 | |||
| 105 | [MEDIA] = LAYOUT_stack( | ||
| 106 | _______, KC_WH_U, KC_WH_L, KC_MS_UP, KC_WH_R, _______, | ||
| 107 | _______, KC_WH_D, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, | ||
| 108 | _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, | ||
| 109 | _______, _______, _______, _______, _______, | ||
| 110 | |||
| 111 | _______, _______, _______, _______, _______, _______, | ||
| 112 | _______, _______, _______, _______, _______, _______, | ||
| 113 | _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, | ||
| 114 | KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE, KC_MRWD, KC_MFFD, _______ | ||
| 115 | ) | ||
| 116 | }; | ||
| 117 | |||
| 118 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 119 | switch (keycode) { | ||
| 120 | case FORM_GET: | ||
| 121 | if (record->event.pressed) { | ||
| 122 | tap_code(KC_BTN1); | ||
| 123 | tap_code16(G(KC_A)); | ||
| 124 | tap_code16(G(KC_C)); | ||
| 125 | } | ||
| 126 | return false; | ||
| 127 | case FORM_PUT: | ||
| 128 | if (record->event.pressed) { | ||
| 129 | tap_code16(KC_MS_BTN1); | ||
| 130 | tap_code16(G(KC_A)); | ||
| 131 | tap_code16(G(KC_V)); | ||
| 132 | } | ||
| 133 | return false; | ||
| 134 | } | ||
| 135 | return true; | ||
| 136 | } | ||
| 137 | |||
| 138 | #ifdef ENCODER_ENABLE | ||
| 139 | void encoder_update_keymap(uint8_t index, bool clockwise) { | ||
| 140 | if (index == 0) { | ||
| 141 | switch (get_highest_layer(layer_state)) { | ||
| 142 | case EDIT: | ||
| 143 | enc_move_words(clockwise); | ||
| 144 | break; | ||
| 145 | case QWERTY: | ||
| 146 | enc_move_desktop(clockwise); | ||
| 147 | default: | ||
| 148 | enc_history_scrubbing(clockwise); | ||
| 149 | break; | ||
| 150 | } | ||
| 151 | } else if (index == 1) { | ||
| 152 | switch (get_highest_layer(layer_state)) { | ||
| 153 | case QWERTY: | ||
| 154 | enc_scrolling(clockwise); | ||
| 155 | break; | ||
| 156 | case FSYM: | ||
| 157 | enc_zoom(clockwise); | ||
| 158 | break; | ||
| 159 | default: | ||
| 160 | enc_volume_knob(clockwise); | ||
| 161 | break; | ||
| 162 | } | ||
| 163 | } | ||
| 164 | } | ||
| 165 | #endif | ||
| 166 | |||
| 167 | #ifdef RGBLIGHT_ENABLE // include mods, as well as layers | ||
| 168 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 169 | switch (get_highest_layer(state)) { | ||
| 170 | case QWERTY: | ||
| 171 | rgblight_setrgb (0x00, 0x00, 0x00); | ||
| 172 | break; | ||
| 173 | case MINIMAK4: | ||
| 174 | rgblight_setrgb (0x20, 0x20, 0x20); | ||
| 175 | break; | ||
| 176 | case NUMPAD: | ||
| 177 | rgblight_setrgb (0xFF, 0x00, 0x00); | ||
| 178 | break; | ||
| 179 | case EDIT: | ||
| 180 | rgblight_setrgb (0x00, 0xFF, 0x00); | ||
| 181 | break; | ||
| 182 | case FSYM: | ||
| 183 | rgblight_setrgb (0x7A, 0x7A, 0x00); | ||
| 184 | break; | ||
| 185 | case JSYM: | ||
| 186 | rgblight_setrgb (0x7A, 0x00, 0x7A); | ||
| 187 | break; | ||
| 188 | case MEDIA: | ||
| 189 | rgblight_setrgb (0x00, 0x7A, 0x7A); | ||
| 190 | break; | ||
| 191 | case ADJUST: | ||
| 192 | rgblight_setrgb (0x7A, 0x7A, 0x7A); | ||
| 193 | break; | ||
| 194 | default: | ||
| 195 | rgblight_setrgb (0x00, 0x00, 0x00); | ||
| 196 | } | ||
| 197 | return state; | ||
| 198 | } | ||
| 199 | #endif | ||
diff --git a/keyboards/kyria/keymaps/rmw/readme.md b/keyboards/kyria/keymaps/rmw/readme.md new file mode 100644 index 000000000..c05ca494b --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/readme.md | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # RMW Kyria Layout | ||
| 2 | |||
| 3 | This is a Kyria edition of the keymap I use on the Ergodox_EZ I use for work. I write reports and code in a variety of languages on that board and the various layers provide plenty of flexibility for navigating, editing text, and writing code and prose. This keymap is mostly Mac-focused in its shortcuts and tapdances. | ||
| 4 | |||
| 5 | ## The theory of this keymap | ||
| 6 | |||
| 7 | The base layer is either QWERTY or MINIMAK4, as desired. Overlaid on that base layer are various layers triggered by one-shots, TOs, and LTs. Tapdances are used to cram lots of mods into few keys and provide freedom to hit combinations with either hand. Mods and layer things are one-shot (where reasonable) because I prefer that. | ||
| 8 | |||
| 9 | An EDIT layer provides text navigation, selection, and editing capabilities in home position. The NUMPAD layer offers a numpad and various spreadsheet-useful navigations and operations. Holding S will put the numpad under your right hand in home position. Keys F and J offer various useful symbols (mostly) on the opposite hand when held, including \[\]\(\)\{\} under the left pointer and middle fingers on bottom, middle, and top rows respectively. The MEDIA layer provides media controls (obvs) and some mouse movement and nav, in case I don't feel like reaching for the trackball/trackpad/mouse. | ||
diff --git a/keyboards/kyria/keymaps/rmw/rules.mk b/keyboards/kyria/keymaps/rmw/rules.mk new file mode 100644 index 000000000..d41ffaef6 --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/rules.mk | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | OLED_DRIVER_ENABLE = no # Enables the use of OLED displays | ||
| 2 | ENCODER_ENABLE = yes # Enables the use of one or more encoders | ||
| 3 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 4 | TAP_DANCE_ENABLE=yes # Enables Tap Dance | ||
diff --git a/keyboards/kyria/kyria.h b/keyboards/kyria/kyria.h index a2a675e0d..13375ae88 100644 --- a/keyboards/kyria/kyria.h +++ b/keyboards/kyria/kyria.h | |||
| @@ -41,3 +41,25 @@ | |||
| 41 | { R32, R33, R34, R35, R36, R37, R38, R39 }, \ | 41 | { R32, R33, R34, R35, R36, R37, R38, R39 }, \ |
| 42 | { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ | 42 | { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ |
| 43 | } | 43 | } |
| 44 | |||
| 45 | #define LAYOUT_stack( \ | ||
| 46 | L00, L01, L02, L03, L04, L05, \ | ||
| 47 | L12, L13, L14, L15, L16, L17, \ | ||
| 48 | L24, L25, L26, L27, L28, L29, L30, L31, \ | ||
| 49 | L40, L41, L42, L43, L44, \ | ||
| 50 | \ | ||
| 51 | R06, R07, R08, R09, R10, R11, \ | ||
| 52 | R18, R19, R20, R21, R22, R23, \ | ||
| 53 | R32, R33, R34, R35, R36, R37, R38, R39, \ | ||
| 54 | R45, R46, R47, R48, R49 \ | ||
| 55 | ) \ | ||
| 56 | { \ | ||
| 57 | { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ | ||
| 58 | { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ | ||
| 59 | { L31, L30, L29, L28, L27, L26, L25, L24 }, \ | ||
| 60 | { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ | ||
| 61 | { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ | ||
| 62 | { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ | ||
| 63 | { R32, R33, R34, R35, R36, R37, R38, R39 }, \ | ||
| 64 | { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ | ||
| 65 | } | ||
