diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index e8f5001380..b69439d7f7 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -21,6 +21,23 @@ unicode_config_t unicode_config; static uint8_t saved_mods; +#ifdef AUDIO_ENABLE + #ifdef UNICODE_LINUX_SONG + float linux_song[][2] = UNICODE_LINUX_SONG; + #endif + #ifdef UNICODE_WINDOWS_SONG + float windows_song[][2] = UNICODE_WINDOWS_SONG; + #endif + #ifdef UNICODE_WIN_COMPOSE_SONG + float win_compose_song[][2] = UNICODE_WIN_COMPOSE_SONG; + #endif + #ifdef UNICODE_OSX_SONG + float osx_song[][2] = UNICODE_OSX_SONG; + #endif + #ifdef UNICODE_OSX_RALT_SONG + float osx_ralt_song[][2] = UNICODE_OSX_RALT_SONG; + #endif +#endif void set_unicode_input_mode(uint8_t os_target) { @@ -138,18 +155,33 @@ bool process_record_unicode_common(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case UNI_OSX: set_unicode_input_mode(UC_OSX); + #if defined(AUDIO_ENABLE) && defined(UNICODE_OSX_SONG) + PLAY_SONG(UNICODE_OSX_SONG); + #endif break; case UNI_LINUX: set_unicode_input_mode(UC_LNX); + #if defined(AUDIO_ENABLE) && defined(UNICODE_LINUX_SONG) + PLAY_SONG(UNICODE_LINUX_SONG); + #endif break; case UNI_WIN: set_unicode_input_mode(UC_WIN); + #if defined(AUDIO_ENABLE) && defined(UNICODE_WINDOWS_SONG) + PLAY_SONG(UNICODE_WINDOWS_SONG); + #endif break; case UNI_WINC: set_unicode_input_mode(UC_WINC); + #if defined(AUDIO_ENABLE) && defined(UNICODE_WIN_COMPOSE_SONG) + PLAY_SONG(UNICODE_WIN_COMPOSE_SONG); + #endif break; case UNI_OSX_RALT: set_unicode_input_mode(UC_OSX_RALT); + #if defined(AUDIO_ENABLE) && defined(UNICODE_OSX_RALT_SONG) + PLAY_SONG(UNICODE_OSX_RALT_SONG); + #endif break; } }