1
0
Fork 0

Play angery sound when an invalid key is pressed

This commit is contained in:
Sijmen 2019-01-01 17:49:47 +01:00
parent d41ccef8a5
commit bce920b4f9

View file

@ -161,29 +161,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case 1:
if (record->event.pressed) {
layer_on(1);
} else {
layer_off(1);
}
break;
case 2:
if (record->event.pressed) {
layer_on(2);
} else {
layer_off(2);
}
break;
}
return MACRO_NONE;
};
static float default_song[][2] = SONG(QWERTY_SOUND);
static float game_song[][2] = SONG(COLEMAK_SOUND);
static float default_song[][2] = SONG(QWERTY_SOUND);
static float game_song[][2] = SONG(COLEMAK_SOUND);
static float terminal_song[][2] = SONG(TERMINAL_SOUND);
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
@ -202,6 +182,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
}
break;
case XXXXXXX:
if (record->event.pressed) {
PLAY_SONG(terminal_song);
return false;
}
break;
}
return true;