diff options
| author | drashna <drashna@live.com> | 2017-11-10 19:58:53 -0800 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-11-10 22:58:53 -0500 |
| commit | 0533362e8205957493d52d4356aa20537a151118 (patch) | |
| tree | 106e6feb82d31192ce349f68b4763c5a3d71dcaa /users | |
| parent | 4df4fa7c265e1e5c9b262851a704db7755971229 (diff) | |
| download | qmk_firmware-0533362e8205957493d52d4356aa20537a151118.tar.gz qmk_firmware-0533362e8205957493d52d4356aa20537a151118.zip | |
Cleaned uppersonal userspace and keymaps (#1998)
* Cleanup of keymaps
* Remove Tap Dance from Orthodox keymap
* Cleaned up userspace and keymaps
* Added sample (template)userspace files to my folder
Diffstat (limited to 'users')
| -rw-r--r-- | users/drashna/drashna.c | 115 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 7 | ||||
| -rw-r--r-- | users/drashna/rules.mk | 1 | ||||
| -rw-r--r-- | users/drashna/template.c | 82 | ||||
| -rw-r--r-- | users/drashna/template.h | 18 |
5 files changed, 164 insertions, 59 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 47565ff9c..30da7414e 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | #include "action.h" | 3 | #include "action.h" |
| 4 | #include "version.h" | 4 | #include "version.h" |
| 5 | 5 | ||
| 6 | // Add reconfigurable functions here, for keymap customization | ||
| 7 | // This allows for a global, userspace functions, and continued | ||
| 8 | // customization of the keymap. Use _keymap instead of _user | ||
| 9 | // functions in the keymaps | ||
| 6 | __attribute__ ((weak)) | 10 | __attribute__ ((weak)) |
| 7 | void matrix_init_keymap(void) {} | 11 | void matrix_init_keymap(void) {} |
| 8 | 12 | ||
| @@ -13,8 +17,15 @@ __attribute__ ((weak)) | |||
| 13 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 17 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 14 | return true; | 18 | return true; |
| 15 | } | 19 | } |
| 20 | __attribute__ ((weak)) | ||
| 21 | uint32_t layer_state_set_keymap (uint32_t state) { | ||
| 22 | return state; | ||
| 23 | } | ||
| 16 | 24 | ||
| 25 | bool is_overwatch = false; | ||
| 17 | 26 | ||
| 27 | // Call user matrix init, set default RGB colors and then | ||
| 28 | // call the keymap's init function | ||
| 18 | void matrix_init_user(void) { | 29 | void matrix_init_user(void) { |
| 19 | #ifdef RGBLIGHT_ENABLE | 30 | #ifdef RGBLIGHT_ENABLE |
| 20 | uint8_t default_layer = eeconfig_read_default_layer(); | 31 | uint8_t default_layer = eeconfig_read_default_layer(); |
| @@ -44,6 +55,8 @@ void matrix_init_user(void) { | |||
| 44 | matrix_init_keymap(); | 55 | matrix_init_keymap(); |
| 45 | } | 56 | } |
| 46 | 57 | ||
| 58 | // No global matrix scan code, so just run keymap's matix | ||
| 59 | // scan function | ||
| 47 | void matrix_scan_user(void) { | 60 | void matrix_scan_user(void) { |
| 48 | matrix_scan_keymap(); | 61 | matrix_scan_keymap(); |
| 49 | } | 62 | } |
| @@ -61,16 +74,10 @@ void persistent_default_layer_set(uint16_t default_layer) { | |||
| 61 | default_layer_set(default_layer); | 74 | default_layer_set(default_layer); |
| 62 | } | 75 | } |
| 63 | 76 | ||
| 64 | 77 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | |
| 78 | // Then runs the _keymap's recod handier if not processed here | ||
| 65 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 79 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 66 | 80 | ||
| 67 | uint16_t kc; | ||
| 68 | if (is_overwatch) { | ||
| 69 | kc = KC_BSPC; | ||
| 70 | } | ||
| 71 | else { | ||
| 72 | kc = KC_ENTER; | ||
| 73 | } | ||
| 74 | #ifdef CONSOLE_ENABLE | 81 | #ifdef CONSOLE_ENABLE |
| 75 | xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); | 82 | xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); |
| 76 | #endif | 83 | #endif |
| @@ -143,6 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 143 | } | 150 | } |
| 144 | return false; | 151 | return false; |
| 145 | break; | 152 | break; |
| 153 | #if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_ergodox_ez)) | ||
| 146 | case KC_OVERWATCH: | 154 | case KC_OVERWATCH: |
| 147 | if (record->event.pressed) { | 155 | if (record->event.pressed) { |
| 148 | is_overwatch = !is_overwatch; | 156 | is_overwatch = !is_overwatch; |
| @@ -154,8 +162,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 154 | break; | 162 | break; |
| 155 | case KC_SALT: | 163 | case KC_SALT: |
| 156 | if (!record->event.pressed) { | 164 | if (!record->event.pressed) { |
| 157 | register_code(kc); | 165 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 158 | unregister_code(kc); | 166 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 159 | _delay_ms(50); | 167 | _delay_ms(50); |
| 160 | SEND_STRING("Salt, salt, salt..."); | 168 | SEND_STRING("Salt, salt, salt..."); |
| 161 | register_code(KC_ENTER); | 169 | register_code(KC_ENTER); |
| @@ -165,8 +173,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 165 | break; | 173 | break; |
| 166 | case KC_MORESALT: | 174 | case KC_MORESALT: |
| 167 | if (!record->event.pressed) { | 175 | if (!record->event.pressed) { |
| 168 | register_code(kc); | 176 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 169 | unregister_code(kc); | 177 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 170 | _delay_ms(50); | 178 | _delay_ms(50); |
| 171 | SEND_STRING("Please sir, can I have some more salt?!"); | 179 | SEND_STRING("Please sir, can I have some more salt?!"); |
| 172 | register_code(KC_ENTER); | 180 | register_code(KC_ENTER); |
| @@ -176,10 +184,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 176 | break; | 184 | break; |
| 177 | case KC_SALTHARD: | 185 | case KC_SALTHARD: |
| 178 | if (!record->event.pressed) { | 186 | if (!record->event.pressed) { |
| 179 | register_code(kc); | 187 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 180 | unregister_code(kc); | 188 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 181 | _delay_ms(50); | 189 | _delay_ms(50); |
| 182 | SEND_STRING("Your salt only makes my penis that much harder, and even more aggressive!"); | 190 | SEND_STRING("Your salt only makes me harder, and even more aggressive!"); |
| 183 | register_code(KC_ENTER); | 191 | register_code(KC_ENTER); |
| 184 | unregister_code(KC_ENTER); | 192 | unregister_code(KC_ENTER); |
| 185 | } | 193 | } |
| @@ -187,8 +195,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 187 | break; | 195 | break; |
| 188 | case KC_GOODGAME: | 196 | case KC_GOODGAME: |
| 189 | if (!record->event.pressed) { | 197 | if (!record->event.pressed) { |
| 190 | register_code(kc); | 198 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 191 | unregister_code(kc); | 199 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 192 | _delay_ms(50); | 200 | _delay_ms(50); |
| 193 | SEND_STRING("Good game, everyone!"); | 201 | SEND_STRING("Good game, everyone!"); |
| 194 | register_code(KC_ENTER); | 202 | register_code(KC_ENTER); |
| @@ -198,8 +206,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 198 | break; | 206 | break; |
| 199 | case KC_GLHF: | 207 | case KC_GLHF: |
| 200 | if (!record->event.pressed) { | 208 | if (!record->event.pressed) { |
| 201 | register_code(kc); | 209 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 202 | unregister_code(kc); | 210 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 203 | _delay_ms(50); | 211 | _delay_ms(50); |
| 204 | SEND_STRING("Good luck, have fun!!!"); | 212 | SEND_STRING("Good luck, have fun!!!"); |
| 205 | register_code(KC_ENTER); | 213 | register_code(KC_ENTER); |
| @@ -209,8 +217,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 209 | break; | 217 | break; |
| 210 | case KC_SYMM: | 218 | case KC_SYMM: |
| 211 | if (!record->event.pressed) { | 219 | if (!record->event.pressed) { |
| 212 | register_code(kc); | 220 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 213 | unregister_code(kc); | 221 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 214 | _delay_ms(50); | 222 | _delay_ms(50); |
| 215 | SEND_STRING("Left click to win!"); | 223 | SEND_STRING("Left click to win!"); |
| 216 | register_code(KC_ENTER); | 224 | register_code(KC_ENTER); |
| @@ -218,21 +226,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 218 | } | 226 | } |
| 219 | return false; | 227 | return false; |
| 220 | break; | 228 | break; |
| 221 | case KC_DOOMFIST: | ||
| 222 | if (!record->event.pressed) { | ||
| 223 | register_code(kc); | ||
| 224 | unregister_code(kc); | ||
| 225 | _delay_ms(50); | ||
| 226 | SEND_STRING("Hey, look at me. I'm Doomfist, and I'm overpowered! All I do is spam punches all day! I'm DPS, tank and defense, rolled into one! All I need is team healing to be complete!"); | ||
| 227 | register_code(KC_ENTER); | ||
| 228 | unregister_code(KC_ENTER); | ||
| 229 | } | ||
| 230 | return false; | ||
| 231 | break; | ||
| 232 | case KC_JUSTGAME: | 229 | case KC_JUSTGAME: |
| 233 | if (!record->event.pressed) { | 230 | if (!record->event.pressed) { |
| 234 | register_code(kc); | 231 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 235 | unregister_code(kc); | 232 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 236 | _delay_ms(50); | 233 | _delay_ms(50); |
| 237 | SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); | 234 | SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); |
| 238 | register_code(KC_ENTER); | 235 | register_code(KC_ENTER); |
| @@ -242,8 +239,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 242 | break; | 239 | break; |
| 243 | case KC_TORB: | 240 | case KC_TORB: |
| 244 | if (!record->event.pressed) { | 241 | if (!record->event.pressed) { |
| 245 | register_code(kc); | 242 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 246 | unregister_code(kc); | 243 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 247 | _delay_ms(50); | 244 | _delay_ms(50); |
| 248 | SEND_STRING("That was positively riveting!"); | 245 | SEND_STRING("That was positively riveting!"); |
| 249 | register_code(KC_ENTER); | 246 | register_code(KC_ENTER); |
| @@ -253,8 +250,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 253 | break; | 250 | break; |
| 254 | case KC_AIM: | 251 | case KC_AIM: |
| 255 | if (!record->event.pressed) { | 252 | if (!record->event.pressed) { |
| 256 | register_code(kc); | 253 | register_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 257 | unregister_code(kc); | 254 | unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); |
| 258 | _delay_ms(50); | 255 | _delay_ms(50); |
| 259 | SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER)); | 256 | SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER)); |
| 260 | _delay_ms(50); | 257 | _delay_ms(50); |
| @@ -262,13 +259,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 262 | } | 259 | } |
| 263 | return false; | 260 | return false; |
| 264 | break; | 261 | break; |
| 262 | #endif | ||
| 265 | case KC_MAKE: | 263 | case KC_MAKE: |
| 266 | if (!record->event.pressed) { | 264 | if (!record->event.pressed) { |
| 265 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); | ||
| 266 | #ifndef CATERINA_BOOTLOADER | ||
| 267 | SEND_STRING(":teensy "); | ||
| 268 | #else | ||
| 269 | SEND_STRING(" "); | ||
| 270 | #endif | ||
| 267 | #ifdef RGBLIGHT_ENABLE | 271 | #ifdef RGBLIGHT_ENABLE |
| 268 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP " RGBLIGHT_ENABLE=yes" SS_TAP(X_ENTER)); | 272 | SEND_STRING("RGBLIGHT_ENABLE=yes "); |
| 273 | #else | ||
| 274 | SEND_STRING("RGBLIGHT_ENABLE=no "); | ||
| 275 | #endif | ||
| 276 | #ifdef AUDIO_ENABLE | ||
| 277 | SEND_STRING("AUDIO_ENABLE=yes "); | ||
| 278 | #else | ||
| 279 | SEND_STRING("AUDIO_ENABLE=no "); | ||
| 280 | #endif | ||
| 281 | #ifdef FAUXCLICKY_ENABLE | ||
| 282 | SEND_STRING("FAUXCLICKY_ENABLE=yes "); | ||
| 269 | #else | 283 | #else |
| 270 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP " RGBLIGHT_ENABLE=no"SS_TAP(X_ENTER)); | 284 | SEND_STRING("FAUXCLICKY_ENABLE=no "); |
| 271 | #endif | 285 | #endif |
| 286 | SEND_STRING(SS_TAP(X_ENTER)); | ||
| 272 | } | 287 | } |
| 273 | return false; | 288 | return false; |
| 274 | break; | 289 | break; |
| @@ -295,21 +310,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 295 | } | 310 | } |
| 296 | return false; | 311 | return false; |
| 297 | break; | 312 | break; |
| 298 | case KC_P00: | ||
| 299 | if (!record->event.pressed) { | ||
| 300 | register_code(KC_P0); | ||
| 301 | unregister_code(KC_P0); | ||
| 302 | register_code(KC_P0); | ||
| 303 | unregister_code(KC_P0); | ||
| 304 | } | ||
| 305 | return false; | ||
| 306 | break; | ||
| 307 | } | 313 | } |
| 308 | return process_record_keymap(keycode, record); | 314 | return process_record_keymap(keycode, record); |
| 309 | } | 315 | } |
| 310 | 316 | ||
| 311 | 317 | // Runs state check and changes underglow color and animation | |
| 312 | uint32_t layer_state_set_kb(uint32_t state) { | 318 | // on layer change, no matter where the change was initiated |
| 319 | // Then runs keymap's layer change check | ||
| 320 | uint32_t layer_state_set_user (uint32_t state) { | ||
| 313 | #ifdef RGBLIGHT_ENABLE | 321 | #ifdef RGBLIGHT_ENABLE |
| 314 | uint8_t default_layer = eeconfig_read_default_layer(); | 322 | uint8_t default_layer = eeconfig_read_default_layer(); |
| 315 | 323 | ||
| @@ -329,7 +337,6 @@ uint32_t layer_state_set_kb(uint32_t state) { | |||
| 329 | case _MACROS: | 337 | case _MACROS: |
| 330 | rgblight_set_orange; | 338 | rgblight_set_orange; |
| 331 | is_overwatch ? rgblight_mode(17) : rgblight_mode(18); | 339 | is_overwatch ? rgblight_mode(17) : rgblight_mode(18); |
| 332 | rgblight_mode(18); | ||
| 333 | break; | 340 | break; |
| 334 | case _MEDIA: | 341 | case _MEDIA: |
| 335 | rgblight_set_green; | 342 | rgblight_set_green; |
| @@ -375,5 +382,5 @@ uint32_t layer_state_set_kb(uint32_t state) { | |||
| 375 | break; | 382 | break; |
| 376 | } | 383 | } |
| 377 | #endif | 384 | #endif |
| 378 | return state; | 385 | return layer_state_set_keymap (state); |
| 379 | } | 386 | } |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0e7b25d2d..6e897ad99 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -38,8 +38,7 @@ | |||
| 38 | #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); | 38 | #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | __attribute__ ((weak)) | 41 | extern bool is_overwatch; |
| 42 | bool is_overwatch = false; | ||
| 43 | 42 | ||
| 44 | enum custom_keycodes { | 43 | enum custom_keycodes { |
| 45 | PLACEHOLDER = SAFE_RANGE, // can always be here | 44 | PLACEHOLDER = SAFE_RANGE, // can always be here |
| @@ -59,15 +58,13 @@ enum custom_keycodes { | |||
| 59 | KC_SALTHARD, | 58 | KC_SALTHARD, |
| 60 | KC_GOODGAME, | 59 | KC_GOODGAME, |
| 61 | KC_SYMM, | 60 | KC_SYMM, |
| 62 | KC_DOOMFIST, | ||
| 63 | KC_JUSTGAME, | 61 | KC_JUSTGAME, |
| 64 | KC_GLHF, | 62 | KC_GLHF, |
| 65 | KC_TORB, | 63 | KC_TORB, |
| 66 | KC_AIM, | 64 | KC_AIM, |
| 67 | KC_MAKE, | 65 | KC_MAKE, |
| 68 | KC_RESET, | 66 | KC_RESET, |
| 69 | KC_P00, | 67 | NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes |
| 70 | NEWPLACEHOLDER | ||
| 71 | }; | 68 | }; |
| 72 | 69 | ||
| 73 | #endif | 70 | #endif |
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 0150bb608..6ce1ff5ba 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | 1 | ||
| 2 | SRC += drashna.c | 2 | SRC += drashna.c |
| 3 | EXTRAFLAGS = -flto | ||
diff --git a/users/drashna/template.c b/users/drashna/template.c new file mode 100644 index 000000000..027c780e9 --- /dev/null +++ b/users/drashna/template.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | #include "drashna.h" | ||
| 2 | #include "quantum.h" | ||
| 3 | #include "action.h" | ||
| 4 | #include "version.h" | ||
| 5 | |||
| 6 | // Add reconfigurable functions here, for keymap customization | ||
| 7 | // This allows for a global, userspace functions, and continued | ||
| 8 | // customization of the keymap. Use _keymap instead of _user | ||
| 9 | // functions in the keymaps | ||
| 10 | __attribute__ ((weak)) | ||
| 11 | void matrix_init_keymap(void) {} | ||
| 12 | |||
| 13 | __attribute__ ((weak)) | ||
| 14 | void matrix_scan_keymap(void) {} | ||
| 15 | |||
| 16 | __attribute__ ((weak)) | ||
| 17 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 18 | return true; | ||
| 19 | } | ||
| 20 | __attribute__ ((weak)) | ||
| 21 | uint32_t layer_state_set_keymap (uint32_t state) { | ||
| 22 | return state; | ||
| 23 | } | ||
| 24 | |||
| 25 | // Call user matrix init, then call the keymap's init function | ||
| 26 | void matrix_init_user(void) { | ||
| 27 | matrix_init_keymap(); | ||
| 28 | } | ||
| 29 | |||
| 30 | // No global matrix scan code, so just run keymap's matix | ||
| 31 | // scan function | ||
| 32 | void matrix_scan_user(void) { | ||
| 33 | matrix_scan_keymap(); | ||
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | ||
| 38 | // Then runs the _keymap's recod handier if not processed here, | ||
| 39 | // And use "NEWPLACEHOLDER" for new safe range | ||
| 40 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | |||
| 42 | switch (keycode) { | ||
| 43 | case KC_MAKE: | ||
| 44 | if (!record->event.pressed) { | ||
| 45 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); | ||
| 46 | #ifndef CATERINA_BOOTLOADER | ||
| 47 | SEND_STRING(":teensy "); | ||
| 48 | #else | ||
| 49 | SEND_STRING(" "); | ||
| 50 | #endif | ||
| 51 | SEND_STRING(SS_TAP(X_ENTER)); | ||
| 52 | } | ||
| 53 | return false; | ||
| 54 | break; | ||
| 55 | case KC_RESET: | ||
| 56 | if (!record->event.pressed) { | ||
| 57 | reset_keyboard(); | ||
| 58 | } | ||
| 59 | return false; | ||
| 60 | break; | ||
| 61 | case EPRM: | ||
| 62 | if (record->event.pressed) { | ||
| 63 | eeconfig_init(); | ||
| 64 | } | ||
| 65 | return false; | ||
| 66 | break; | ||
| 67 | case VRSN: | ||
| 68 | if (record->event.pressed) { | ||
| 69 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 70 | } | ||
| 71 | return false; | ||
| 72 | break; | ||
| 73 | } | ||
| 74 | return process_record_keymap(keycode, record); | ||
| 75 | } | ||
| 76 | |||
| 77 | // Runs state check and changes underglow color and animation | ||
| 78 | // on layer change, no matter where the change was initiated | ||
| 79 | // Then runs keymap's layer change check | ||
| 80 | uint32_t layer_state_set_user (uint32_t state) { | ||
| 81 | return layer_state_set_keymap (state); | ||
| 82 | } | ||
diff --git a/users/drashna/template.h b/users/drashna/template.h new file mode 100644 index 000000000..d1251462b --- /dev/null +++ b/users/drashna/template.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #ifndef USERSPACE | ||
| 2 | #define USERSPACE | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // Define layer names | ||
| 7 | #define BASE 0 | ||
| 8 | |||
| 9 | enum custom_keycodes { | ||
| 10 | PLACEHOLDER = SAFE_RANGE, // can always be here | ||
| 11 | EPRM, | ||
| 12 | VRSN, | ||
| 13 | KC_MAKE, | ||
| 14 | KC_RESET, | ||
| 15 | NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes | ||
| 16 | }; | ||
| 17 | |||
| 18 | #endif | ||
