diff options
| author | Casey Webster <casey.webster@gmail.com> | 2020-10-18 15:55:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-18 13:55:38 -0700 |
| commit | 8bb2eeaabb6d79e774c6aae6c651857ce2e380dc (patch) | |
| tree | 2bed24bc62765fa3aceb3bd771d12ac65652da10 /keyboards/kyria | |
| parent | c492dd791243b98a119fbf29c9b041d14238b102 (diff) | |
| download | qmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.tar.gz qmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.zip | |
[Keymap] add cwebster2 userspace and keymaps (#10541)
* Adding my keymap
* Add a starter keymap for kyria
* Updated keymap
* Add auto shift, tapping modifications and gravatar oled bitmap
* Add flashing helper scripts
* Updates to my keymap
* Enable raw hid and rgblight sleep
* Cleanup
* Updated keymap and board features
* Remove some RGB modes for space
* Start working on a miryoku-like keymap.
This adds homerow mods to my keymap on the base layer and adds
a game layer that doesnt have them
* more work on keymaps
* Fine tuning home row mods
* update keymap
* Keymap update
* add split transport
* keymap
* cherry pick from develop
* merge develop
* fix
* keymap iterations
* Refactoring
* continued refactoring
* messing with rgb
* update layer coloring
* continued refactoring
* more features
* modifier color
* Move stuff to userspace
* Moving stuff out to userspace
* refactoring into userspace
* More refactoring
* Fixing some errors in the keymap and changing the oled output
* Sync zen1 keymap to my userspace config
* Update copyright notices and revert transport.c to master
* Swap tab and esc
* Remove a file accidentally created
* Use LTO_ENABLE to turn on Link_Time_Optimization
* Drop modtap thumbs on game layout
* Update game keymap
* More iteration on the game keymap
* Add oled indications of kitty and i3 mod
* Promote colemak to default
* Update tapping term for modtap keys
* Add per key tapping term
* Use left modifiers on right side
Diffstat (limited to 'keyboards/kyria')
| -rw-r--r-- | keyboards/kyria/keymaps/cwebster2/config.h | 55 | ||||
| -rw-r--r-- | keyboards/kyria/keymaps/cwebster2/keymap.c | 397 | ||||
| -rw-r--r-- | keyboards/kyria/keymaps/cwebster2/rules.mk | 5 |
3 files changed, 457 insertions, 0 deletions
diff --git a/keyboards/kyria/keymaps/cwebster2/config.h b/keyboards/kyria/keymaps/cwebster2/config.h new file mode 100644 index 000000000..6a56d7ee9 --- /dev/null +++ b/keyboards/kyria/keymaps/cwebster2/config.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* Copyright 2020 Casey Webster <casey@e1337.dev> | ||
| 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 | #ifdef OLED_DRIVER_ENABLE | ||
| 20 | #define OLED_DISPLAY_128X64 | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #ifdef RGBLIGHT_ENABLE | ||
| 24 | //#define RGBLIGHT_ANIMATIONS | ||
| 25 | //#define RGBLIGHT_EFFECT_ALTERNATING | ||
| 26 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 27 | //#define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 28 | //#define RGBLIGHT_EFFECT_KNIGHT | ||
| 29 | //#define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 30 | //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 31 | //#define RGBLIGHT_EFFECT_RGB_TEST | ||
| 32 | //#define RGBLIGHT_EFFECT_SNAKE | ||
| 33 | //#define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 34 | //#define RGBLIGHT_EFFECT_TWINKLE | ||
| 35 | #define RGBLIGHT_HUE_STEP 8 | ||
| 36 | #define RGBLIGHT_SAT_STEP 8 | ||
| 37 | #define RGBLIGHT_VAL_STEP 8 | ||
| 38 | #define RGBLIGHT_SLEEP | ||
| 39 | #define RGBLIGHT_LIMIT_VAL 128 | ||
| 40 | #define RGBLIGHT_EFFECT_BREATHE_MAX 128 | ||
| 41 | #define RGBLIGHT_LAYERS | ||
| 42 | #define RGBLIGHT_MAX_LAYERS 16 | ||
| 43 | //#define RGBLIGHT_STARTUP_ANIMATION | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #ifdef COMBO_ENABLE | ||
| 47 | #define COMBO_COUNT 2 | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #define QMK_KEYS_PER_SCAN 4 | ||
| 51 | |||
| 52 | #define EE_HANDS | ||
| 53 | |||
| 54 | //#define DEBUG_MATRIX_SCAN_RATE | ||
| 55 | //#define SPLIT_MODS_ENABLE | ||
diff --git a/keyboards/kyria/keymaps/cwebster2/keymap.c b/keyboards/kyria/keymaps/cwebster2/keymap.c new file mode 100644 index 000000000..311ad167a --- /dev/null +++ b/keyboards/kyria/keymaps/cwebster2/keymap.c | |||
| @@ -0,0 +1,397 @@ | |||
| 1 | /* Copyright 2020 Casey Webster <casey@e1337.dev> | ||
| 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 "raw_hid.h" | ||
| 18 | #define RAW_EPSIZE 8 | ||
| 19 | #include <stdio.h> | ||
| 20 | |||
| 21 | #include "cwebster2.h" | ||
| 22 | |||
| 23 | #ifdef WPM_ENABLE | ||
| 24 | char wpm_str[10]; | ||
| 25 | uint16_t wpm_graph_timer = 0; | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifdef COMBO_ENABLE | ||
| 29 | enum combos { | ||
| 30 | ZX_COPY, | ||
| 31 | CV_PASTE | ||
| 32 | }; | ||
| 33 | |||
| 34 | const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END }; | ||
| 35 | const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END }; | ||
| 36 | |||
| 37 | combo_t key_combos[COMBO_COUNT] = { | ||
| 38 | [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), | ||
| 39 | [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)) | ||
| 40 | }; | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #define LAYOUT_kyria_base( \ | ||
| 44 | L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \ | ||
| 45 | L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \ | ||
| 46 | L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \ | ||
| 47 | L33, L34, L35, R35, R34, R33 \ | ||
| 48 | ) \ | ||
| 49 | LAYOUT_kyria_wrapper ( \ | ||
| 50 | KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \ | ||
| 51 | KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \ | ||
| 52 | KC_EQL, L21, L22, L23, L24, L25, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, R25, R24, R23, R22, R21, KC_MINS, \ | ||
| 53 | SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR \ | ||
| 54 | ) | ||
| 55 | #define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) | ||
| 56 | |||
| 57 | |||
| 58 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 59 | /* | ||
| 60 | * Base Layer: QWERTY | ||
| 61 | */ | ||
| 62 | [_QWERTY] = LAYOUT_kyria_base_wrapper( | ||
| 63 | /* ,-----------------------. ,-----------------------. */ | ||
| 64 | _______QWERTY_L1______, _______QWERTY_R1______, | ||
| 65 | _______QWERTY_L2______, _______QWERTY_R2______, | ||
| 66 | _______QWERTY_L3______, _______QWERTY_R3______, | ||
| 67 | _______THUMBS_L_______, _______THUMBS_R_______ | ||
| 68 | /* `---------------------' `---------------------' */ | ||
| 69 | ), | ||
| 70 | [_COLEMAK] = LAYOUT_kyria_wrapper( | ||
| 71 | /* ,-----------------------. ,-----------------------. */ | ||
| 72 | KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS, | ||
| 73 | KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN, | ||
| 74 | KC_EQL, _______COLEMAK_L3_____, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS, | ||
| 75 | SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR | ||
| 76 | /* `---------------------' `---------------------' */ | ||
| 77 | ), | ||
| 78 | // GAME layout -- qwerty without homerow mods | ||
| 79 | [_GAME] = LAYOUT_kyria_wrapper( | ||
| 80 | /* ,-------------------------------------------. ,-------------------------------------------. */ | ||
| 81 | KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, | ||
| 82 | KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 83 | KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS, | ||
| 84 | KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12 | ||
| 85 | /* `----------------------------------' `----------------------------------' */ | ||
| 86 | ), | ||
| 87 | [_FN] = LAYOUT_kyria_base_wrapper( | ||
| 88 | /* ,-----------------------. ,-----------------------. */ | ||
| 89 | _______FN_______L1____, _______INACTIVE_R1____, | ||
| 90 | _______FN_______L2____, _______INACTIVE_R2____, | ||
| 91 | _______FN_______L3____, _______NAV______R2____, | ||
| 92 | _______FN________T____, _______INACTIVE__T____ | ||
| 93 | /* `---------------------' `---------------------' */ | ||
| 94 | ), | ||
| 95 | [_SYMBOLS] = LAYOUT_kyria_base_wrapper( | ||
| 96 | /* ,-----------------------. ,-----------------------. */ | ||
| 97 | _______SYM______L1____, _______INACTIVE_R1____, | ||
| 98 | _______SYM______L2____, _______INACTIVE_R2____, | ||
| 99 | _______SYM______L3____, _______INACTIVE_R3____, | ||
| 100 | _______SYM_______T____, _______INACTIVE__T____ | ||
| 101 | /* `---------------------' `---------------------' */ | ||
| 102 | ), | ||
| 103 | [_NUM] = LAYOUT_kyria_base_wrapper( | ||
| 104 | /* ,-----------------------. ,-----------------------. */ | ||
| 105 | _______NUM______L1____, _______INACTIVE_R1____, | ||
| 106 | _______NUM______L2____, _______INACTIVE_R2____, | ||
| 107 | _______NUM______L3____, _______INACTIVE_R3____, | ||
| 108 | _______NUM_______T____, _______INACTIVE__T____ | ||
| 109 | /* `---------------------' `---------------------' */ | ||
| 110 | ), | ||
| 111 | [_NAV] = LAYOUT_kyria_base_wrapper( | ||
| 112 | /* ,-----------------------. ,-----------------------. */ | ||
| 113 | _______INACTIVE_L1____, _______NAV______R1____, | ||
| 114 | _______INACTIVE_L2____, _______NAV______R2____, | ||
| 115 | _______INACTIVE_L3____, _______NAV______R3____, | ||
| 116 | _______INACTIVE__T____, _______NAV_______T____ | ||
| 117 | /* `---------------------' `---------------------' */ | ||
| 118 | ), | ||
| 119 | [_MOUSE] = LAYOUT_kyria_base_wrapper( | ||
| 120 | /* ,-----------------------. ,-----------------------. */ | ||
| 121 | _______INACTIVE_L1____, _______MOUSE____R1____, | ||
| 122 | _______INACTIVE_L2____, _______MOUSE____R2____, | ||
| 123 | _______INACTIVE_L3____, _______MOUSE____R3____, | ||
| 124 | _______INACTIVE__T____, _______MOUSE_____T____ | ||
| 125 | /* `---------------------' `---------------------' */ | ||
| 126 | ), | ||
| 127 | [_MEDIA] = LAYOUT_kyria_base_wrapper( | ||
| 128 | /* ,-----------------------. ,-----------------------. */ | ||
| 129 | _______INACTIVE_L1____, _______MEDIA____R1____, | ||
| 130 | _______INACTIVE_L2____, _______MEDIA____R2____, | ||
| 131 | _______INACTIVE_L3____, _______MEDIA____R3____, | ||
| 132 | _______INACTIVE__T____, _______MEDIA_____T____ | ||
| 133 | /* `---------------------' `---------------------' */ | ||
| 134 | ), | ||
| 135 | }; | ||
| 136 | |||
| 137 | #ifdef RAW_ENABLE | ||
| 138 | static void send_layer_via_hid(int layer) { | ||
| 139 | uint8_t data[RAW_EPSIZE]; | ||
| 140 | data[0] = 1; | ||
| 141 | data[1] = layer; | ||
| 142 | raw_hid_send(data, sizeof(data)); | ||
| 143 | return; | ||
| 144 | } | ||
| 145 | #endif | ||
| 146 | |||
| 147 | |||
| 148 | #ifdef RGBLIGHT_LAYERS | ||
| 149 | const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} ); | ||
| 150 | const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} ); | ||
| 151 | const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} ); | ||
| 152 | const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} ); | ||
| 153 | const rgblight_segment_t PROGMEM my_symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GREEN} ); | ||
| 154 | const rgblight_segment_t PROGMEM my_num_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_CORAL} ); | ||
| 155 | const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GOLDENROD} ); | ||
| 156 | const rgblight_segment_t PROGMEM my_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_TURQUOISE} ); | ||
| 157 | const rgblight_segment_t PROGMEM my_media_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_MAGENTA} ); | ||
| 158 | |||
| 159 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 160 | {0, 3, HSV_RED}, | ||
| 161 | {7, 1, HSV_RED}, | ||
| 162 | {10, 3, HSV_RED}, | ||
| 163 | {17, 1, HSV_RED} | ||
| 164 | ); | ||
| 165 | |||
| 166 | const rgblight_segment_t PROGMEM my_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 167 | {3, 1, HSV_RED}, | ||
| 168 | {13, 1, HSV_RED} | ||
| 169 | ); | ||
| 170 | |||
| 171 | const rgblight_segment_t PROGMEM my_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 172 | {4, 1, HSV_ORANGE}, | ||
| 173 | {14, 1, HSV_ORANGE} | ||
| 174 | ); | ||
| 175 | |||
| 176 | const rgblight_segment_t PROGMEM my_alt_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 177 | {5, 1, HSV_GOLD}, | ||
| 178 | {15, 1, HSV_GOLD} | ||
| 179 | ); | ||
| 180 | |||
| 181 | const rgblight_segment_t PROGMEM my_gui_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 182 | {9, 1, HSV_SPRINGGREEN}, | ||
| 183 | {19, 1, HSV_SPRINGGREEN} | ||
| 184 | ); | ||
| 185 | |||
| 186 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 187 | my_colemak_layer, | ||
| 188 | my_qwerty_layer, | ||
| 189 | my_game_layer, | ||
| 190 | my_fn_layer, | ||
| 191 | my_symbols_layer, | ||
| 192 | my_num_layer, | ||
| 193 | my_nav_layer, | ||
| 194 | my_mouse_layer, | ||
| 195 | my_media_layer, | ||
| 196 | my_capslock_layer, | ||
| 197 | my_shift_layer, | ||
| 198 | my_ctrl_layer, | ||
| 199 | my_alt_layer, | ||
| 200 | my_gui_layer | ||
| 201 | ); | ||
| 202 | |||
| 203 | void matrix_scan_keymap(void) { | ||
| 204 | uint8_t mods = mod_config(get_mods()); | ||
| 205 | rgblight_set_layer_state(10, mods & MOD_MASK_SHIFT); | ||
| 206 | rgblight_set_layer_state(11, mods & MOD_MASK_CTRL); | ||
| 207 | rgblight_set_layer_state(12, mods & MOD_MASK_ALT); | ||
| 208 | rgblight_set_layer_state(13, mods & MOD_MASK_GUI); | ||
| 209 | } | ||
| 210 | #endif | ||
| 211 | |||
| 212 | void keyboard_post_init_user(void) { | ||
| 213 | rgblight_sethsv_noeeprom(HSV_BLUE); | ||
| 214 | keyboard_post_init_rgb(); | ||
| 215 | #ifdef RGBLIGHT_LAYERS | ||
| 216 | rgblight_layers = my_rgb_layers; | ||
| 217 | #else | ||
| 218 | rgblight_sethsv_noeeprom(HSV_BLUE); | ||
| 219 | #endif | ||
| 220 | /*debug_enable=true;*/ | ||
| 221 | /*debug_matrix=true;*/ | ||
| 222 | } | ||
| 223 | |||
| 224 | //todo https://github.com/qmk/qmk_firmware/blob/debdc6379c7a72815df1f53e3406479381d243af/keyboards/crkbd/keymaps/soundmonster/keymap.c RGBRST | ||
| 225 | |||
| 226 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 227 | #ifdef RGBLIGHT_LAYERS | ||
| 228 | for (int i = _QWERTY; i < __LAST; i++) { | ||
| 229 | rgblight_set_layer_state(i, layer_state_cmp(state, i)); | ||
| 230 | } | ||
| 231 | # ifdef RAW_ENABLE | ||
| 232 | send_layer_via_hid(state); | ||
| 233 | # endif | ||
| 234 | #endif | ||
| 235 | return state; | ||
| 236 | } | ||
| 237 | |||
| 238 | #ifdef RGBLIGHT_LAYERS | ||
| 239 | bool led_update_user(led_t led_state) { | ||
| 240 | rgblight_set_layer_state(9, led_state.caps_lock); | ||
| 241 | return true; | ||
| 242 | } | ||
| 243 | #endif | ||
| 244 | |||
| 245 | #ifdef OLED_DRIVER_ENABLE | ||
| 246 | void suspend_power_down_user() { | ||
| 247 | oled_clear(); | ||
| 248 | oled_off(); | ||
| 249 | } | ||
| 250 | |||
| 251 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 252 | return OLED_ROTATION_180; | ||
| 253 | } | ||
| 254 | |||
| 255 | static void render_logo(void) { | ||
| 256 | static const char PROGMEM qmk_logo[] = { | ||
| 257 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
| 258 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
| 259 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; | ||
| 260 | |||
| 261 | static const char PROGMEM logo[] = { | ||
| 262 | // canvas is 128x64. need 16 padding | ||
| 263 | // 80x32 | ||
| 264 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 265 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0, 0x60, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 267 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 268 | 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x7c, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x7c, 0xf8, 0xe0, 0x60, 0x20, 0x10, 0x10, 0x0c, 0x0f, 0x09, 0x08, 0x00, 0x09, 0x9b, 0x5c, 0x50, 0x10, 0x20, 0x40, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x10, 0x00, 0x00, | ||
| 269 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 270 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 271 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x17, 0x15, 0x3d, 0xef, 0xaf, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0xa0, 0xbf, 0xff, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 272 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 273 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 274 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 275 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 276 | }; | ||
| 277 | oled_write_raw_P(logo, sizeof(logo)); | ||
| 278 | |||
| 279 | oled_advance_page(false); | ||
| 280 | oled_advance_page(false); | ||
| 281 | oled_advance_page(false); | ||
| 282 | oled_advance_page(false); | ||
| 283 | oled_write_P(qmk_logo, false); | ||
| 284 | |||
| 285 | #ifdef COMBO_ENABLE | ||
| 286 | oled_write_P(PSTR("Combos enabled: "), false); | ||
| 287 | if (is_combo_enabled()) { | ||
| 288 | oled_write_P(PSTR("Yes\n"), false); | ||
| 289 | } else { | ||
| 290 | oled_write_P(PSTR("No\n"), false); | ||
| 291 | } | ||
| 292 | #endif | ||
| 293 | |||
| 294 | #ifdef SPLIT_MODS_ENABLE | ||
| 295 | uint8_t mods = get_mods() | get_weak_mods(); | ||
| 296 | oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); | ||
| 297 | oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); | ||
| 298 | oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); | ||
| 299 | oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); | ||
| 300 | oled_write_P(PSTR("\n"), false); | ||
| 301 | |||
| 302 | #endif | ||
| 303 | |||
| 304 | #ifdef WPM_ENABLE | ||
| 305 | // Write WPM | ||
| 306 | sprintf(wpm_str, "WPM: %03d", get_current_wpm()); | ||
| 307 | //oled_write_P(PSTR("\n"), false); | ||
| 308 | oled_write_P(PSTR(" "), false); | ||
| 309 | oled_write(wpm_str, false); | ||
| 310 | #endif | ||
| 311 | } | ||
| 312 | |||
| 313 | |||
| 314 | static void render_status(void) { | ||
| 315 | static bool isColemak = false; | ||
| 316 | // QMK Logo and version information | ||
| 317 | oled_write_P(PSTR("Kyria rev1.3\n\n"), false); | ||
| 318 | |||
| 319 | oled_write_P(isColemak ? PSTR("COLEMAK ") : PSTR("QWERTY "), false); | ||
| 320 | |||
| 321 | // Host Keyboard Layer Status | ||
| 322 | switch (get_highest_layer(layer_state)) { | ||
| 323 | case _QWERTY: | ||
| 324 | oled_write_P(PSTR("Default\n"), false); | ||
| 325 | isColemak = false; | ||
| 326 | break; | ||
| 327 | case _SYMBOLS: | ||
| 328 | oled_write_P(PSTR("Shifted Sym\n"), false); | ||
| 329 | break; | ||
| 330 | case _NUM: | ||
| 331 | oled_write_P(PSTR("Numbers\n"), false); | ||
| 332 | break; | ||
| 333 | case _NAV: | ||
| 334 | oled_write_P(PSTR("Navigation\n"), false); | ||
| 335 | break; | ||
| 336 | case _FN: | ||
| 337 | oled_write_P(PSTR("Fn\n"), false); | ||
| 338 | break; | ||
| 339 | case _GAME: | ||
| 340 | oled_write_P(PSTR("Game\n"), false); | ||
| 341 | isColemak = false; | ||
| 342 | break; | ||
| 343 | case _COLEMAK: | ||
| 344 | oled_write_P(PSTR("Colemak-DHm\n"), false); | ||
| 345 | isColemak = true; | ||
| 346 | break; | ||
| 347 | case _MEDIA: | ||
| 348 | oled_write_P(PSTR("Media keys\n"), false); | ||
| 349 | break; | ||
| 350 | case _MOUSE: | ||
| 351 | oled_write_P(PSTR("Mouse keys\n"), false); | ||
| 352 | break; | ||
| 353 | default: | ||
| 354 | oled_write_P(PSTR("Undefined\n"), false); | ||
| 355 | } | ||
| 356 | |||
| 357 | uint8_t mods = get_mods() | get_weak_mods(); | ||
| 358 | oled_write_P(PSTR("\n"), false); | ||
| 359 | oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); | ||
| 360 | oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); | ||
| 361 | oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); | ||
| 362 | oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); | ||
| 363 | oled_write_P(PSTR("\n"), false); | ||
| 364 | |||
| 365 | #define I3MASK MOD_BIT(KC_LGUI) | ||
| 366 | #define I3SMASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_LSFT)) | ||
| 367 | #define KMASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) | ||
| 368 | |||
| 369 | oled_write_P((mods == I3MASK) ? PSTR("I3 ") : (mods == I3SMASK) ? PSTR("I3-SFT ") : PSTR(" "), false); | ||
| 370 | oled_write_P((mods == KMASK) ? PSTR("KITTY ") : PSTR(" "), false); | ||
| 371 | oled_write_P(PSTR("\n"), false); | ||
| 372 | |||
| 373 | // Host Keyboard LED Status | ||
| 374 | uint8_t led_usb_state = host_keyboard_leds(); | ||
| 375 | oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); | ||
| 376 | oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); | ||
| 377 | oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); | ||
| 378 | |||
| 379 | } | ||
| 380 | |||
| 381 | void oled_task_user(void) { | ||
| 382 | if (is_keyboard_master()) { | ||
| 383 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | ||
| 384 | } else { | ||
| 385 | render_logo(); | ||
| 386 | } | ||
| 387 | } | ||
| 388 | #endif | ||
| 389 | |||
| 390 | |||
| 391 | #ifdef RAW_ENABLE | ||
| 392 | void raw_hid_receive(uint8_t *data, uint8_t length) { | ||
| 393 | // messages from host | ||
| 394 | // add ability to set color | ||
| 395 | raw_hid_send(data, length); | ||
| 396 | } | ||
| 397 | #endif | ||
diff --git a/keyboards/kyria/keymaps/cwebster2/rules.mk b/keyboards/kyria/keymaps/cwebster2/rules.mk new file mode 100644 index 000000000..fe9ca3c2c --- /dev/null +++ b/keyboards/kyria/keymaps/cwebster2/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays | ||
| 2 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 3 | RAW_ENABLE = yes | ||
| 4 | WPM_ENABLE = yes | ||
| 5 | COMBO_ENABLE = no | ||
