diff options
| author | Drashna Jaelre <drashna@live.com> | 2018-03-31 19:38:06 -0700 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-03-31 22:38:06 -0400 |
| commit | 61a2169ff9dea52136139ec156995efdc7929851 (patch) | |
| tree | 5aebd210218859e55b211f10684ef15fc23f9dcc /users/drashna/drashna.c | |
| parent | adae37f19f0d16b703e1ebce0449822492098444 (diff) | |
| download | qmk_firmware-61a2169ff9dea52136139ec156995efdc7929851.tar.gz qmk_firmware-61a2169ff9dea52136139ec156995efdc7929851.zip | |
Update to Drashna Keymaps and Userspace (#2650)
* Change global config.h settings
* Make Shift LED brighter
* Compatibility Tweaks
* Update ASCII art and layer comments
* Add comments about MOD layer
* Change ASCII art for reset, since it was out of date
* Use Overwatch theme for Workman layer
* Fix RGB define comments
* Make sure RGB set list matches
* Stop all notes for custom Faux Click
* Switch to OSM for everything, and remove RGB Sleep
* Never use KEYMAP now
* Only enable RGB Sleep on Non-Ergodox boards
* Cleanup do to new rgblight_list.h file
* Add redirect message for RGB codes
* Update userspace documentation
* Cleanup of Userspace
Add unicode support, and cleaned up comments for ifdef statements
* Remove unneeded slashes
* Unicode handling
* Force NKRO
Diffstat (limited to 'users/drashna/drashna.c')
| -rw-r--r-- | users/drashna/drashna.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index d23b9b9df..170c320d3 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 18 | #include "drashna.h" | 18 | #include "drashna.h" |
| 19 | #include "version.h" | 19 | #include "version.h" |
| 20 | 20 | ||
| 21 | #if (__has_include("secrets.h")) | 21 | #if (__has_include("secrets.h") && !defined(NO_SECRETS)) |
| 22 | #include "secrets.h" | 22 | #include "secrets.h" |
| 23 | #else | 23 | #else |
| 24 | // `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware | 24 | // `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware |
| @@ -36,10 +36,10 @@ PROGMEM const char secret[][64] = { | |||
| 36 | #ifdef FAUXCLICKY_ENABLE | 36 | #ifdef FAUXCLICKY_ENABLE |
| 37 | float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25); | 37 | float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25); |
| 38 | float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125); | 38 | float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125); |
| 39 | #else | 39 | #else // FAUXCLICKY_ENABLE |
| 40 | float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to your tastes | 40 | float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to your tastes |
| 41 | float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes | 41 | float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes |
| 42 | #endif | 42 | #endif // FAUXCLICKY_ENABLE |
| 43 | 43 | ||
| 44 | bool faux_click_enabled = false; | 44 | bool faux_click_enabled = false; |
| 45 | bool is_overwatch = false; | 45 | bool is_overwatch = false; |
| @@ -127,7 +127,7 @@ void run_diablo_macro_check(void) { | |||
| 127 | } | 127 | } |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | #endif | 130 | #endif // TAP_DANCE_ENABLE |
| 131 | 131 | ||
| 132 | 132 | ||
| 133 | // Add reconfigurable functions here, for keymap customization | 133 | // Add reconfigurable functions here, for keymap customization |
| @@ -178,10 +178,15 @@ void matrix_init_user(void) { | |||
| 178 | } | 178 | } |
| 179 | else | 179 | else |
| 180 | { | 180 | { |
| 181 | rgblight_set_red; | 181 | rgblight_setrgb_red(); |
| 182 | rgblight_mode(5); | 182 | rgblight_mode(5); |
| 183 | } | 183 | } |
| 184 | #endif | 184 | #endif // RGBLIGHT_ENABLE |
| 185 | |||
| 186 | #if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) ) | ||
| 187 | set_unicode_input_mode(UC_WINC); | ||
| 188 | #endif //UNICODE_ENABLE | ||
| 189 | |||
| 185 | matrix_init_keymap(); | 190 | matrix_init_keymap(); |
| 186 | } | 191 | } |
| 187 | // No global matrix scan code, so just run keymap's matrix | 192 | // No global matrix scan code, so just run keymap's matrix |
| @@ -189,7 +194,7 @@ void matrix_init_user(void) { | |||
| 189 | void matrix_scan_user(void) { | 194 | void matrix_scan_user(void) { |
| 190 | #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. | 195 | #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. |
| 191 | run_diablo_macro_check(); | 196 | run_diablo_macro_check(); |
| 192 | #endif | 197 | #endif // TAP_DANCE_ENABLE |
| 193 | matrix_scan_keymap(); | 198 | matrix_scan_keymap(); |
| 194 | } | 199 | } |
| 195 | 200 | ||
| @@ -209,29 +214,24 @@ bool send_game_macro(const char *str, keyrecord_t *record, bool override) { | |||
| 209 | return false; | 214 | return false; |
| 210 | } | 215 | } |
| 211 | 216 | ||
| 212 | // Sent the default layer | ||
| 213 | void persistent_default_layer_set(uint16_t default_layer) { | ||
| 214 | eeconfig_update_default_layer(default_layer); | ||
| 215 | default_layer_set(default_layer); | ||
| 216 | } | ||
| 217 | |||
| 218 | 217 | ||
| 219 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 218 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 220 | // Then runs the _keymap's record handier if not processed here | 219 | // Then runs the _keymap's record handier if not processed here |
| 221 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 220 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 222 | 221 | ||
| 223 | // If console is enabled, it will print the matrix position and status of each key pressed | 222 | // If console is enabled, it will print the matrix position and status of each key pressed |
| 224 | #ifdef CONSOLE_ENABLE | 223 | #ifdef CONSOLE_ENABLE |
| 225 | xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); | 224 | xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); |
| 226 | #endif //CONSOLE_ENABLE | 225 | #endif //CONSOLE_ENABLE |
| 227 | 226 | ||
| 228 | // Run custom faux click code, but only if faux clicky is enabled | 227 | // Run custom faux click code, but only if faux clicky is enabled |
| 229 | #ifdef AUDIO_ENABLE | 228 | #ifdef AUDIO_ENABLE |
| 230 | if ( (faux_click_enabled && keycode != KC_FXCL) || (!faux_click_enabled && keycode == KC_FXCL) ) { | 229 | if ( (faux_click_enabled && keycode != KC_FXCL) || (!faux_click_enabled && keycode == KC_FXCL) ) { |
| 231 | if (record->event.pressed) { | 230 | if (record->event.pressed) { |
| 231 | stop_all_notes(); | ||
| 232 | PLAY_SONG(fauxclicky_pressed); | 232 | PLAY_SONG(fauxclicky_pressed); |
| 233 | } else { | 233 | } else { |
| 234 | stop_note(NOTE_A6); | 234 | stop_all_notes(); |
| 235 | PLAY_SONG(fauxclicky_released); | 235 | PLAY_SONG(fauxclicky_released); |
| 236 | } | 236 | } |
| 237 | } | 237 | } |
| @@ -307,7 +307,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 307 | ":teensy" | 307 | ":teensy" |
| 308 | #elif defined(BOOTLOADER_CATERINA) | 308 | #elif defined(BOOTLOADER_CATERINA) |
| 309 | ":avrdude" | 309 | ":avrdude" |
| 310 | #endif | 310 | #endif // bootloader options |
| 311 | SS_TAP(X_ENTER)); | 311 | SS_TAP(X_ENTER)); |
| 312 | } | 312 | } |
| 313 | return false; | 313 | return false; |
| @@ -320,7 +320,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 320 | rgblight_enable(); | 320 | rgblight_enable(); |
| 321 | rgblight_mode(1); | 321 | rgblight_mode(1); |
| 322 | rgblight_setrgb_red(); | 322 | rgblight_setrgb_red(); |
| 323 | #endif | 323 | #endif // RGBLIGHT_ENABLE |
| 324 | reset_keyboard(); | 324 | reset_keyboard(); |
| 325 | } | 325 | } |
| 326 | return false; | 326 | return false; |
| @@ -498,7 +498,7 @@ uint32_t layer_state_set_user(uint32_t state) { | |||
| 498 | break; | 498 | break; |
| 499 | } | 499 | } |
| 500 | } | 500 | } |
| 501 | #endif | 501 | #endif // RGBLIGHT_ENABLE |
| 502 | return layer_state_set_keymap (state); | 502 | return layer_state_set_keymap (state); |
| 503 | } | 503 | } |
| 504 | 504 | ||
