]> git.donarmstrong.com Git - qmk_firmware.git/blob - users/drashna/drashna.h
update avr url
[qmk_firmware.git] / users / drashna / drashna.h
1 /*
2 Copyright 2017 Christopher Courtney <drashna@live.com> @drashna
3
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.
8
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.
13
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/>.
16 */
17
18 #ifndef USERSPACE
19 #define USERSPACE
20
21 #include "quantum.h"
22
23 // Define layer names 
24 #define _QWERTY 0
25 #define _NUMLOCK 0
26 #define _COLEMAK 1
27 #define _DVORAK 2
28 #define _WORKMAN 3
29 #define _NAV 5
30 #define _COVECUBE 6
31 #define _SYMB 8
32 #define _GAMEPAD 9
33 #define _DIABLO 10
34 #define _MOUS 11
35 #define _MACROS 12
36 #define _MEDIA 13
37 #define _LOWER 14
38 #define _RAISE 15
39 #define _ADJUST 16
40
41
42 //define modifiers
43 #define MODS_SHIFT_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
44 #define MODS_CTRL_MASK  (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
45 #define MODS_ALT_MASK  (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
46 #define MODS_GUI_MASK  (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
47
48 #ifndef RGBLIGHT_ANIMATIONS // add "EXTRA_FLADS=-DDRASHNA_SETRGB" to enable this ... but don't
49 #define rgblight_set_blue        rgblight_setrgb (0x00,  0x00, 0xFF);
50 #define rgblight_set_red         rgblight_setrgb (0xFF,  0x00, 0x00);
51 #define rgblight_set_green       rgblight_setrgb (0x00,  0xFF, 0x00);
52 #define rgblight_set_orange      rgblight_setrgb (0xFF,  0x80, 0x00);
53 #define rgblight_set_teal        rgblight_setrgb (0x00,  0xFF, 0xFF);
54 #define rgblight_set_magenta     rgblight_setrgb (0xFF,  0x00, 0xFF);
55 #define rgblight_set_yellow      rgblight_setrgb (0xFF,  0xFF, 0x00);
56 #define rgblight_set_purple      rgblight_setrgb (0x7A,  0x00, 0xFF);
57 #define rgblight_set_white       rgblight_setrgb (0xFF,  0xFF, 0xFF);
58 #else
59 #define rgblight_set_blue        rgblight_sethsv (0xFF,  0xFF, 0xFF);
60 #define rgblight_set_red         rgblight_sethsv (0x00,  0xFF, 0xFF);
61 #define rgblight_set_green       rgblight_sethsv (0x78,  0xFF, 0xFF);
62 #define rgblight_set_orange      rgblight_sethsv (0x1E,  0xFF, 0xFF);
63 #define rgblight_set_teal        rgblight_sethsv (0xB4,  0xFF, 0xFF);
64 #define rgblight_set_magenta     rgblight_sethsv (0x12C, 0xFF, 0xFF);
65 #define rgblight_set_yellow      rgblight_sethsv (0x3C,  0xFF, 0xFF);
66 #define rgblight_set_purple      rgblight_sethsv (0x10E, 0xFF, 0xFF);
67 #define rgblight_set_white       rgblight_sethsv (0x00,  0x00, 0xFF);
68 #endif // DRASHNA_SETRGB
69
70 extern bool is_overwatch;
71 extern bool rgb_layer_change;
72
73 enum userspace_custom_keycodes {
74   EPRM = SAFE_RANGE, // can always be here
75   VRSN,
76   KC_QWERTY,
77   KC_COLEMAK,
78   KC_DVORAK,
79   KC_WORKMAN,
80   LOWER,
81   RAISE,
82   ADJUST,
83   KC_DIABLO_CLEAR,
84   KC_OVERWATCH,
85   KC_SALT,
86   KC_MORESALT,
87   KC_SALTHARD,
88   KC_GOODGAME,
89   KC_SYMM,
90   KC_JUSTGAME,
91   KC_GLHF,
92   KC_TORB,
93   KC_AIM,
94   KC_C9,
95   KC_GGEZ,
96   KC_MAKE,
97   KC_RESET,
98   KC_RGB_T,
99   KC_SECRET_1,
100   KC_SECRET_2,
101   KC_SECRET_3,
102   KC_SECRET_4,
103   KC_SECRET_5,
104   NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
105 };
106
107 #ifdef TAP_DANCE_ENABLE
108 enum {
109   TD_D3_1 = 0,
110   TD_D3_2,
111   TD_D3_3,
112   TD_D3_4
113 };
114 #endif
115
116 #ifdef TAP_DANCE_ENABLE
117 #define KC_D3_1 TD(TD_D3_1)
118 #define KC_D3_2 TD(TD_D3_2)
119 #define KC_D3_3 TD(TD_D3_3)
120 #define KC_D3_4 TD(TD_D3_4)
121 #else
122 #define KC_D3_1 KC_1
123 #define KC_D3_2 KC_2
124 #define KC_D3_3 KC_3
125 #define KC_D3_4 KC_4
126 #endif
127
128 #define QMK_KEYS_PER_SCAN 8
129
130 #ifdef RGBLIGHT_ENABLE
131 #define RGBLIGHT_SLEEP
132 #endif
133
134 #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.)
135
136 #endif