]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/shiro/keymaps/check/keymap.c
[Keyboard] add macro pad "Shiro" (#6338)
[qmk_firmware.git] / keyboards / shiro / keymaps / check / keymap.c
1 /* Copyright 2019 T.Shinohara
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  */
16 #include QMK_KEYBOARD_H
17
18 // Defines the keycodes used by our macros in process_record_user
19 enum custom_keycodes {
20   TEST_A1 = SAFE_RANGE,
21   TEST_A2,
22   TEST_A3,
23   TEST_B1,
24   TEST_B2,
25   TEST_B3,
26   TEST_C1,
27   TEST_C2,
28   TEST_C3,
29   TEST_D1,
30   TEST_D2,
31   TEST_D3,
32   TEST_E1,
33   TEST_E2,
34   TEST_E3
35 };
36
37 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38   [0] = LAYOUT( /* Base */ 
39     TEST_A1,  TEST_A2,  TEST_A3,
40     TEST_B1,  TEST_B2,  TEST_B3,
41     TEST_C1,  TEST_C2,  TEST_C3,
42     TEST_D1,  TEST_D2,  TEST_D3,
43     TEST_E1,  TEST_E2,  TEST_E3
44   )
45 };
46
47 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
48   switch (keycode) {
49     case TEST_A1: if(record->event.pressed){ SEND_STRING("A1"); } break;
50     case TEST_A2: if(record->event.pressed){ SEND_STRING("A2"); } break;
51     case TEST_A3: if(record->event.pressed){ SEND_STRING("A3"); } break;
52     case TEST_B1: if(record->event.pressed){ SEND_STRING("B1"); } break;
53     case TEST_B2: if(record->event.pressed){ SEND_STRING("B2"); } break;
54     case TEST_B3: if(record->event.pressed){ SEND_STRING("B3"); } break;
55     case TEST_C1: if(record->event.pressed){ SEND_STRING("C1"); } break;
56     case TEST_C2: if(record->event.pressed){ SEND_STRING("C2"); } break;
57     case TEST_C3: if(record->event.pressed){ SEND_STRING("C3"); } break;
58     case TEST_D1: if(record->event.pressed){ SEND_STRING("D1"); } break;
59     case TEST_D2: if(record->event.pressed){ SEND_STRING("D2"); } break;
60     case TEST_D3: if(record->event.pressed){ SEND_STRING("D3"); } break;
61     case TEST_E1: if(record->event.pressed){ SEND_STRING("E1"); } break;
62     case TEST_E2: if(record->event.pressed){ SEND_STRING("E2"); } break;
63     case TEST_E3: if(record->event.pressed){ SEND_STRING("E3"); } break;
64   }
65   return true;
66 }