summaryrefslogtreecommitdiffstats
path: root/users/drashna/drashna.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-11-29 11:43:42 -0800
committerGitHub <noreply@github.com>2022-11-29 11:43:42 -0800
commit4a87af0e9af046d5fc00d930476920c0c34a57a7 (patch)
treecb2da20c670a49b9fcada84822a7bdb2bd144d60 /users/drashna/drashna.c
parent8a8000b4ec379448848f561f57bbe2c781376357 (diff)
[Keymap] Drashna updates for 0.19 (#19175)
* Fix up bastardkb boards since blackpill support is officially added. * Check for blackpill version, not elite c. * Add checks in chibiOS config since multiple ARM controllers supported. * Rework rules.mk for keymaps to better handle arm vs avr support * Start moving away from `matrix_*_*` functions. * `housekeeping_task_*` instead of `matrix_scan_*` * `keyboard_(pre|post)_init_*` instead of `matrix_init_*` * Add ℂℴmⅈℂ unicode input method. * Clean up unicode code to be more compact and flexible. * Remove/move Pro Micro LED commands to userspace and better filter them * Fixup OLED code * Use newer quantum keycode functions/preprocessors rather than manual bit manipulation * Make unicode mode render much more compact/simple. * Make qmk secrets more self contained * Remove custom implementation of split watchdog
Diffstat (limited to 'users/drashna/drashna.c')
-rw-r--r--users/drashna/drashna.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index d63f05b590..283e82d13d 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -130,14 +130,35 @@ void keyboard_post_init_i2c(void) {
}
#endif
-#if defined(AUTOCORRECT_ENABLE) && defined(AUDIO_ENABLE)
-# ifdef USER_SONG_LIST
+#if defined(AUTOCORRECT_ENABLE)
+# if defined(AUDIO_ENABLE)
+# ifdef USER_SONG_LIST
float autocorrect_song[][2] = SONG(MARIO_GAMEOVER);
-# else
+# else
float autocorrect_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+# endif
# endif
+
bool apply_autocorrect(uint8_t backspaces, const char *str) {
+ if (layer_state_is(_GAMEPAD)) {
+ return false;
+ }
+ // TO-DO use unicode stuff for this. Will probably have to reverse engineer
+ // send string to get working properly, to send char string.
+
+# if defined(AUDIO_ENABLE)
PLAY_SONG(autocorrect_song);
+# endif
return true;
}
#endif
+
+#if defined(CAPS_WORD_ENABLE) && !defined(NO_ACTION_ONESHOT)
+void oneshot_locked_mods_changed_user(uint8_t mods) {
+ if (mods & MOD_MASK_SHIFT) {
+ del_mods(MOD_MASK_SHIFT);
+ set_oneshot_locked_mods(~MOD_MASK_SHIFT & get_oneshot_locked_mods());
+ caps_word_on();
+ }
+}
+#endif