aboutsummaryrefslogtreecommitdiff
path: root/users/bocaj/bocaj.h
diff options
context:
space:
mode:
Diffstat (limited to 'users/bocaj/bocaj.h')
-rw-r--r--users/bocaj/bocaj.h96
1 files changed, 42 insertions, 54 deletions
diff --git a/users/bocaj/bocaj.h b/users/bocaj/bocaj.h
index 04991a015..e69be74da 100644
--- a/users/bocaj/bocaj.h
+++ b/users/bocaj/bocaj.h
@@ -1,5 +1,6 @@
1/* 1/*
2Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell 2Copyright 2017 Christopher Courtney <drashna@live.com> @drashna
3Copyright 2020 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell
3 4
4This program is free software: you can redistribute it and/or modify 5This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by 6it under the terms of the GNU General Public License as published by
@@ -16,70 +17,57 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 17*/
17 18
18#pragma once 19#pragma once
19#include "quantum.h" 20#include QMK_KEYBOARD_H
21
20#include "version.h" 22#include "version.h"
21#include "eeprom.h" 23#include "eeprom.h"
22#include "wrappers.h"
23#include "process_records.h" 24#include "process_records.h"
24#ifdef TAP_DANCE_ENABLE 25#include "wrappers.h"
25 #include "tap_dances.h" 26#if defined(RGB_MATRIX_ENABLE)
26#endif // TAP_DANCE_ENABLE 27# include "rgb_matrix_stuff.h"
28#endif
27 29
28/* Layer Names */ 30/* Define layer names */
29enum userspace_layers { 31enum userspace_layers {
30 _WORKMAN = 0, 32 _WORKMAN = 0,
31 _WINWORKMAN, 33 _QWERTY,
32 _QWERTY, 34 _WWORKMAN,
33 _LOWER, 35 _WQWERTY,
34 _ADJUST, 36 _LOWER,
35 _DIABLO, 37 _RAISE,
38 _ADJUST,
39 _MOD,
40 LAYER_SAFE_RANGE,
36}; 41};
37 42
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/*
46define 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)) 43#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)) 44#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)) 45#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)) 46#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
52 47
53bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); 48bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
54bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); 49bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
55bool send_game_macro(const char *str, keyrecord_t *record, bool override); 50void matrix_init_keymap(void);
56void matrix_init_keymap(void); 51void shutdown_keymap(void);
57void shutdown_keymap(void); 52void suspend_power_down_keymap(void);
58void suspend_power_down_keymap(void); 53void suspend_wakeup_init_keymap(void);
59void suspend_wakeup_init_keymap(void); 54void matrix_scan_keymap(void);
60void matrix_scan_keymap(void); 55layer_state_t layer_state_set_keymap(layer_state_t state);
61uint32_t layer_state_set_keymap (uint32_t state); 56layer_state_t default_layer_state_set_keymap(layer_state_t state);
62uint32_t default_layer_state_set_keymap (uint32_t state); 57void led_set_keymap(uint8_t usb_led);
63void led_set_keymap(uint8_t usb_led); 58void eeconfig_init_keymap(void);
64void eeconfig_init_keymap(void); 59bool hasAllBitsInMask(uint8_t value, uint8_t mask);
65void tap(uint16_t keycode);
66 60
61// clang-format off
62#ifdef KEYBOARD_planck_ez
67typedef union { 63typedef union {
68 uint8_t raw; 64 uint32_t raw;
65 struct {
66 bool rgb_layer_change :1;
67 bool rgb_matrix_idle_anim :1;
68 };
69} userspace_config_t; 69} userspace_config_t;
70// clang-format on
70 71
71extern userspace_config_t userspace_config; 72extern userspace_config_t userspace_config;
72 73#endif
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