diff options
author | Joshua T <joshua@sonofone.net> | 2016-08-09 21:30:31 -0500 |
---|---|---|
committer | Joshua T <joshua@sonofone.net> | 2016-08-09 21:30:31 -0500 |
commit | ec67d32bd4a2249186f3b84a044ee3f9f9bbc394 (patch) | |
tree | e974e00dd1cd62f99e52bd1d518f9191113d4560 /keyboards/cluecard/keymaps/default/keymap.c | |
parent | ea8638b9440ca9e8cf99437b01c69c5f9e7693d5 (diff) | |
parent | 2a160bbbe3ad496dd688f4399ab2b8d127c0b8a7 (diff) |
Merged branch master into master
Diffstat (limited to 'keyboards/cluecard/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/cluecard/keymaps/default/keymap.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/keyboards/cluecard/keymaps/default/keymap.c b/keyboards/cluecard/keymaps/default/keymap.c new file mode 100644 index 0000000000..517afe867b --- /dev/null +++ b/keyboards/cluecard/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include "cluecard.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + RGB_TOG, RGB_SAI, RGB_VAI, \ + RGB_HUD, RGB_HUI, \ + RGB_MOD, RGB_SAD, RGB_VAD, \ + BL_STEP, \ + F(0), F(1), F(2) \ + ) +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), + [1] = ACTION_FUNCTION(1), + [2] = ACTION_FUNCTION(2) +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch (id) { + case 0: + PLAY_NOTE_ARRAY(tone_startup, false, 0); + break; + case 1: + PLAY_NOTE_ARRAY(music_scale, false, 0); + break; + case 2: + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + break; + } + } +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} |