Add audio feedback to input mode keys to drive konstantin up a wall

pull/4217/head
Drashna Jaelre 7 years ago
parent 9698e3f262
commit 59bf691ce3
No known key found for this signature in database
GPG Key ID: 4C4221222CD5F9F0

@ -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;
}
}

Loading…
Cancel
Save