]> git.donarmstrong.com Git - qmk_firmware.git/blob - users/bocaj/bocaj.h
Remove more commented out MCUs
[qmk_firmware.git] / users / bocaj / bocaj.h
1 /*
2 Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell
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 #pragma once
19 #include "quantum.h"
20 #include "version.h"
21 #include "eeprom.h"
22 #include "wrappers.h"
23 #include "process_records.h"
24 #ifdef TAP_DANCE_ENABLE
25   #include "tap_dances.h"
26 #endif // TAP_DANCE_ENABLE
27
28 /* Layer Names */
29 enum userspace_layers {
30   _WORKMAN = 0,
31   _WINWORKMAN,
32   _QWERTY,
33   _LOWER,
34   _ADJUST,
35   _DIABLO,
36 };
37
38 #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
39   #define BOCAJ_UNICODE_MODE UC_OSX
40 #else
41   // set to 2 for UC_WIN, set to 4 for UC_WINC
42   #define BOCAJ_UNICODE_MODE 2
43 #endif
44
45 /*
46 define modifiers here, since MOD_* doesn't seem to work for these
47  */
48 #define MODS_SHIFT_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
49 #define MODS_CTRL_MASK  (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
50 #define MODS_ALT_MASK  (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
51 #define MODS_GUI_MASK  (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
52
53 bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
54 bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
55 bool send_game_macro(const char *str, keyrecord_t *record, bool override);
56 void matrix_init_keymap(void);
57 void shutdown_keymap(void);
58 void suspend_power_down_keymap(void);
59 void suspend_wakeup_init_keymap(void);
60 void matrix_scan_keymap(void);
61 uint32_t layer_state_set_keymap (uint32_t state);
62 uint32_t default_layer_state_set_keymap (uint32_t state);
63 void led_set_keymap(uint8_t usb_led);
64 void eeconfig_init_keymap(void);
65 void tap(uint16_t keycode);
66
67 typedef union {
68   uint8_t raw;
69 } userspace_config_t;
70
71 extern userspace_config_t userspace_config;
72
73 // If Tap Dancing is enabled, we manage that here.
74 // If it is not, then we define the KC_D3_# codes gracefully
75 #ifdef TAP_DANCE_ENABLE
76   #define KC_D3_1 TD(TD_D3_1)
77   #define KC_D3_2 TD(TD_D3_2)
78   #define KC_D3_3 TD(TD_D3_3)
79   #define KC_D3_4 TD(TD_D3_4)
80 #else // !TAP_DANCE_ENABLE
81   #define KC_D3_1 KC_1
82   #define KC_D3_2 KC_2
83   #define KC_D3_3 KC_3
84   #define KC_D3_4 KC_4
85 #endif // TAP_DANCE_ENABLE