aboutsummaryrefslogtreecommitdiff
path: root/keyboards/clueboard/60/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/clueboard/60/keymaps/default/keymap.c')
-rw-r--r--keyboards/clueboard/60/keymaps/default/keymap.c94
1 files changed, 89 insertions, 5 deletions
diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c
index 1b0c71264..8397c4bbf 100644
--- a/keyboards/clueboard/60/keymaps/default/keymap.c
+++ b/keyboards/clueboard/60/keymaps/default/keymap.c
@@ -3,11 +3,35 @@
3#define _______ KC_TRNS 3#define _______ KC_TRNS
4 4
5enum keyboard_layers { 5enum keyboard_layers {
6 _BL, 6 _BL,
7 _FL, 7 _FL,
8 _CL 8 _CL
9}; 9};
10 10
11enum custom_keycodes {
12 S_BSKTC = SAFE_RANGE,
13 S_ODEJY,
14 S_RCKBY,
15 S_DOEDR,
16 S_SCALE,
17 S_ONEUP,
18 S_COIN,
19 S_SONIC,
20 S_ZELDA
21};
22
23#ifdef AUDIO_ENABLE
24 float song_basketcase[][2] = SONG(BASKET_CASE);
25 float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
26 float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
27 float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
28 float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
29 float song_coin[][2] = SONG(COIN_SOUND);
30 float song_one_up[][2] = SONG(ONE_UP_SOUND);
31 float song_sonic_ring[][2] = SONG(SONIC_RING);
32 float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
33#endif
34
11const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 35const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
12 /* Layer 0: Default Layer 36 /* Layer 0: Default Layer
13 * ,-----------------------------------------------------------. 37 * ,-----------------------------------------------------------.
@@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ 57 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
34 _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 58 _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
35 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ 59 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
36 _______, _______, _______, _______, _______, _______, MO(_FL), _______), 60 _______,_______,_______, _______, _______, _______, MO(_FL), _______),
37 [_CL] = KEYMAP( 61 [_CL] = KEYMAP(
38 BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ 62 BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\
39 _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ 63 _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \
40 _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 64 _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
41 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 65 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
42 _______, _______, _______, _______, _______, _______, MO(_FL), _______) 66 _______, _______, _______, _______, _______, _______, MO(_FL), _______)
43}; 67};
68
69bool process_record_user(uint16_t keycode, keyrecord_t *record) {
70 switch (keycode) {
71 case S_BSKTC:
72 if (record->event.pressed) {
73 stop_all_notes();
74 PLAY_SONG(song_basketcase);
75 }
76 return false;
77 case S_ODEJY:
78 if (record->event.pressed) {
79 stop_all_notes();
80 PLAY_SONG(song_ode_to_joy);
81 }
82 return false;
83 case S_RCKBY:
84 if (record->event.pressed) {
85 stop_all_notes();
86 PLAY_SONG(song_rock_a_bye_baby);
87 }
88 return false;
89 case S_DOEDR:
90 if (record->event.pressed) {
91 stop_all_notes();
92 PLAY_SONG(song_doe_a_deer);
93 }
94 return false;
95 case S_SCALE:
96 if (record->event.pressed) {
97 stop_all_notes();
98 PLAY_SONG(song_scale);
99 }
100 return false;
101 case S_ONEUP:
102 if (record->event.pressed) {
103 stop_all_notes();
104 PLAY_SONG(song_one_up);
105 }
106 return false;
107 case S_COIN:
108 if (record->event.pressed) {
109 stop_all_notes();
110 PLAY_SONG(song_coin);
111 }
112 return false;
113 case S_SONIC:
114 if (record->event.pressed) {
115 stop_all_notes();
116 PLAY_SONG(song_sonic_ring);
117 }
118 return false;
119 case S_ZELDA:
120 if (record->event.pressed) {
121 stop_all_notes();
122 PLAY_SONG(song_zelda_puzzle);
123 }
124 return false;
125 }
126 return true;
127}