diff options
Diffstat (limited to 'users/drashna/drashna.h')
-rw-r--r-- | users/drashna/drashna.h | 59 |
1 files changed, 9 insertions, 50 deletions
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 7bcae881e..5a9da1627 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
@@ -1,18 +1,5 @@ | |||
1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | 1 | // Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> |
2 | * | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
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 | 3 | ||
17 | #pragma once | 4 | #pragma once |
18 | #include QMK_KEYBOARD_H | 5 | #include QMK_KEYBOARD_H |
@@ -20,6 +7,8 @@ | |||
20 | #include "eeprom.h" | 7 | #include "eeprom.h" |
21 | #include "keyrecords/wrappers.h" | 8 | #include "keyrecords/wrappers.h" |
22 | #include "keyrecords/process_records.h" | 9 | #include "keyrecords/process_records.h" |
10 | #include "callbacks.h" | ||
11 | |||
23 | #ifdef TAP_DANCE_ENABLE | 12 | #ifdef TAP_DANCE_ENABLE |
24 | # include "keyrecords/tap_dances.h" | 13 | # include "keyrecords/tap_dances.h" |
25 | #endif // TAP_DANCE_ENABLE | 14 | #endif // TAP_DANCE_ENABLE |
@@ -58,7 +47,7 @@ enum userspace_layers { | |||
58 | _ADJUST, | 47 | _ADJUST, |
59 | }; | 48 | }; |
60 | 49 | ||
61 | #define _MACROS _MOUSE | 50 | #define _MACROS _MOUSE |
62 | #define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER | 51 | #define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER |
63 | #define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1) | 52 | #define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1) |
64 | #define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2) | 53 | #define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2) |
@@ -86,23 +75,10 @@ enum userspace_layers { | |||
86 | #define DEFAULT_LAYER_3_RGB RGB_MAGENTA | 75 | #define DEFAULT_LAYER_3_RGB RGB_MAGENTA |
87 | #define DEFAULT_LAYER_4_RGB RGB_GOLDENROD | 76 | #define DEFAULT_LAYER_4_RGB RGB_GOLDENROD |
88 | 77 | ||
89 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); | 78 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); |
90 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | 79 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); |
91 | void matrix_init_keymap(void); | 80 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); |
92 | void matrix_init_secret(void); | 81 | void tap_code16_nomods(uint8_t kc); |
93 | void shutdown_keymap(void); | ||
94 | void suspend_power_down_keymap(void); | ||
95 | void suspend_wakeup_init_keymap(void); | ||
96 | void matrix_scan_keymap(void); | ||
97 | void matrix_scan_secret(void); | ||
98 | layer_state_t layer_state_set_keymap(layer_state_t state); | ||
99 | layer_state_t default_layer_state_set_keymap(layer_state_t state); | ||
100 | void led_set_keymap(uint8_t usb_led); | ||
101 | void eeconfig_init_keymap(void); | ||
102 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); | ||
103 | #ifdef SPLIT_KEYBOARD | ||
104 | void matrix_slave_scan_keymap(void); | ||
105 | #endif | ||
106 | 82 | ||
107 | // clang-format off | 83 | // clang-format off |
108 | typedef union { | 84 | typedef union { |
@@ -119,20 +95,3 @@ typedef union { | |||
119 | // clang-format on | 95 | // clang-format on |
120 | 96 | ||
121 | extern userspace_config_t userspace_config; | 97 | extern userspace_config_t userspace_config; |
122 | |||
123 | /* | ||
124 | Custom Keycodes for Diablo 3 layer | ||
125 | But since TD() doesn't work when tap dance is disabled | ||
126 | We use custom codes here, so we can substitute the right stuff | ||
127 | */ | ||
128 | #ifdef TAP_DANCE_ENABLE | ||
129 | # define KC_D3_1 TD(TD_D3_1) | ||
130 | # define KC_D3_2 TD(TD_D3_2) | ||
131 | # define KC_D3_3 TD(TD_D3_3) | ||
132 | # define KC_D3_4 TD(TD_D3_4) | ||
133 | #else // TAP_DANCE_ENABLE | ||
134 | # define KC_D3_1 KC_1 | ||
135 | # define KC_D3_2 KC_2 | ||
136 | # define KC_D3_3 KC_3 | ||
137 | # define KC_D3_4 KC_4 | ||
138 | #endif // TAP_DANCE_ENABLE | ||