2 Copyright 2017 Christopher Courtney <drashna@live.com> @drashna
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/>.
45 #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
46 #define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
47 #define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
48 #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
50 #ifndef RGBLIGHT_ANIMATIONS // add "EXTRA_FLADS=-DDRASHNA_SETRGB" to enable this ... but don't
51 #define rgblight_set_blue rgblight_setrgb (0x00, 0x00, 0xFF);
52 #define rgblight_set_red rgblight_setrgb (0xFF, 0x00, 0x00);
53 #define rgblight_set_green rgblight_setrgb (0x00, 0xFF, 0x00);
54 #define rgblight_set_orange rgblight_setrgb (0xFF, 0x80, 0x00);
55 #define rgblight_set_teal rgblight_setrgb (0x00, 0xFF, 0xFF);
56 #define rgblight_set_magenta rgblight_setrgb (0xFF, 0x00, 0xFF);
57 #define rgblight_set_yellow rgblight_setrgb (0xFF, 0xFF, 0x00);
58 #define rgblight_set_purple rgblight_setrgb (0x7A, 0x00, 0xFF);
59 #define rgblight_set_white rgblight_setrgb (0xFF, 0xFF, 0xFF);
61 #define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
62 #define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
63 #define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
64 #define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
65 #define rgblight_set_teal rgblight_sethsv (0xB4, 0xFF, 0xFF);
66 #define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
67 #define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
68 #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
69 #define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF);
70 #endif // DRASHNA_SETRGB
72 extern bool is_overwatch;
73 extern bool rgb_layer_change;
75 enum userspace_custom_keycodes {
76 EPRM = SAFE_RANGE, // can always be here
107 NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
110 #ifdef TAP_DANCE_ENABLE
119 #ifdef TAP_DANCE_ENABLE
120 #define KC_D3_1 TD(TD_D3_1)
121 #define KC_D3_2 TD(TD_D3_2)
122 #define KC_D3_3 TD(TD_D3_3)
123 #define KC_D3_4 TD(TD_D3_4)
131 #define QMK_KEYS_PER_SCAN 8
133 #ifdef RGBLIGHT_ENABLE
134 #define RGBLIGHT_SLEEP
137 #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
139 #ifdef FAUXCLICKY_ENABLE
141 #define AUD_OFF FC_OFF
144 #define AUD_OFF AU_OFF
149 // Since our quirky block definitions are basically a list of comma separated
150 // arguments, we need a wrapper in order for these definitions to be
151 // expanded before being used as arguments to the LAYOUT_xxx macro.
152 #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
153 #define KEYMAP_wrapper(...) KEYMAP(__VA_ARGS__)
155 // Blocks for each of the four major keyboard layouts
156 // Organized so we can quickly adapt and modify all of them
157 // at once, rather than for each keyboard, one at a time.
158 // And this allows wor much cleaner blocks in the keymaps.
159 // For instance Tap/Hold for Control on all of the layouts
161 #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
162 #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
163 #define _________________QWERTY_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
165 #define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
166 #define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
167 #define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
170 #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
171 #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
172 #define _________________COLEMAK_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
174 #define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
175 #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
176 #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
179 #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
180 #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
181 #define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
183 #define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
184 #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
185 #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
188 #define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
189 #define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I
190 #define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
192 #define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L
193 #define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S
194 #define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
198 // Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
199 // this allows us to quickly modify the bottom row for all of the layouts
200 // so we don't have to alter it 4 times and hope that we haven't missed
202 #define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_LGUI, KC_LBRC, KC_RBRC
203 #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT