2 Copyright 2011 Jun Wako <wakojun@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 /* TODO: Refactoring */
22 typedef enum { ONESHOT, CONSOLE, MOUSEKEY } command_state_t;
23 extern command_state_t command_state;
25 /* This allows to extend commands. Return false when command is not processed. */
26 bool command_extra(uint8_t code);
27 bool command_console_extra(uint8_t code);
30 bool command_proc(uint8_t code);
32 #define command_proc(code) false
36 #ifndef MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
37 #define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
40 #ifndef MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
41 #define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
44 #ifndef MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
45 #define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
48 #ifndef MAGIC_KEY_HELP1
49 #define MAGIC_KEY_HELP1 H
52 #ifndef MAGIC_KEY_HELP2
53 #define MAGIC_KEY_HELP2 SLASH
56 #ifndef MAGIC_KEY_DEBUG
57 #define MAGIC_KEY_DEBUG D
60 #ifndef MAGIC_KEY_DEBUG_MATRIX
61 #define MAGIC_KEY_DEBUG_MATRIX X
64 #ifndef MAGIC_KEY_DEBUG_KBD
65 #define MAGIC_KEY_DEBUG_KBD K
68 #ifndef MAGIC_KEY_DEBUG_MOUSE
69 #define MAGIC_KEY_DEBUG_MOUSE M
72 #ifndef MAGIC_KEY_VERSION
73 #define MAGIC_KEY_VERSION V
76 #ifndef MAGIC_KEY_STATUS
77 #define MAGIC_KEY_STATUS S
80 #ifndef MAGIC_KEY_CONSOLE
81 #define MAGIC_KEY_CONSOLE C
84 #ifndef MAGIC_KEY_LAYER0_ALT1
85 #define MAGIC_KEY_LAYER0_ALT1 ESC
88 #ifndef MAGIC_KEY_LAYER0_ALT2
89 #define MAGIC_KEY_LAYER0_ALT2 GRAVE
92 #ifndef MAGIC_KEY_LAYER0
93 #define MAGIC_KEY_LAYER0 0
96 #ifndef MAGIC_KEY_LAYER1
97 #define MAGIC_KEY_LAYER1 1
100 #ifndef MAGIC_KEY_LAYER2
101 #define MAGIC_KEY_LAYER2 2
104 #ifndef MAGIC_KEY_LAYER3
105 #define MAGIC_KEY_LAYER3 3
108 #ifndef MAGIC_KEY_LAYER4
109 #define MAGIC_KEY_LAYER4 4
112 #ifndef MAGIC_KEY_LAYER5
113 #define MAGIC_KEY_LAYER5 5
116 #ifndef MAGIC_KEY_LAYER6
117 #define MAGIC_KEY_LAYER6 6
120 #ifndef MAGIC_KEY_LAYER7
121 #define MAGIC_KEY_LAYER7 7
124 #ifndef MAGIC_KEY_LAYER8
125 #define MAGIC_KEY_LAYER8 8
128 #ifndef MAGIC_KEY_LAYER9
129 #define MAGIC_KEY_LAYER9 9
132 #ifndef MAGIC_KEY_BOOTLOADER
133 #define MAGIC_KEY_BOOTLOADER PAUSE
136 #ifndef MAGIC_KEY_LOCK
137 #define MAGIC_KEY_LOCK CAPS
140 #ifndef MAGIC_KEY_EEPROM
141 #define MAGIC_KEY_EEPROM E
144 #ifndef MAGIC_KEY_NKRO
145 #define MAGIC_KEY_NKRO N
148 #ifndef MAGIC_KEY_SLEEP_LED
149 #define MAGIC_KEY_SLEEP_LED Z
153 #define XMAGIC_KC(key) KC_##key
154 #define MAGIC_KC(key) XMAGIC_KC(key)