mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-27 19:42:04 +00:00
Add audio feedback to input mode keys to drive konstantin up a wall
This commit is contained in:
parent
9698e3f262
commit
59bf691ce3
@ -21,6 +21,23 @@
|
|||||||
|
|
||||||
unicode_config_t unicode_config;
|
unicode_config_t unicode_config;
|
||||||
static uint8_t saved_mods;
|
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) {
|
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) {
|
switch (keycode) {
|
||||||
case UNI_OSX:
|
case UNI_OSX:
|
||||||
set_unicode_input_mode(UC_OSX);
|
set_unicode_input_mode(UC_OSX);
|
||||||
|
#if defined(AUDIO_ENABLE) && defined(UNICODE_OSX_SONG)
|
||||||
|
PLAY_SONG(UNICODE_OSX_SONG);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case UNI_LINUX:
|
case UNI_LINUX:
|
||||||
set_unicode_input_mode(UC_LNX);
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
#if defined(AUDIO_ENABLE) && defined(UNICODE_LINUX_SONG)
|
||||||
|
PLAY_SONG(UNICODE_LINUX_SONG);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case UNI_WIN:
|
case UNI_WIN:
|
||||||
set_unicode_input_mode(UC_WIN);
|
set_unicode_input_mode(UC_WIN);
|
||||||
|
#if defined(AUDIO_ENABLE) && defined(UNICODE_WINDOWS_SONG)
|
||||||
|
PLAY_SONG(UNICODE_WINDOWS_SONG);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case UNI_WINC:
|
case UNI_WINC:
|
||||||
set_unicode_input_mode(UC_WINC);
|
set_unicode_input_mode(UC_WINC);
|
||||||
|
#if defined(AUDIO_ENABLE) && defined(UNICODE_WIN_COMPOSE_SONG)
|
||||||
|
PLAY_SONG(UNICODE_WIN_COMPOSE_SONG);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case UNI_OSX_RALT:
|
case UNI_OSX_RALT:
|
||||||
set_unicode_input_mode(UC_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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user