summaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/drashna.c7
-rw-r--r--users/drashna/drashna.h1
-rw-r--r--users/drashna/process_records.h38
-rw-r--r--users/drashna/rules.mk13
4 files changed, 36 insertions, 23 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 6a436e0af0..b48d837d00 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -219,3 +219,10 @@ void eeconfig_init_user(void) {
eeconfig_init_keymap();
keyboard_init();
}
+
+bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
+ value &= 0xF;
+ mask &= 0xF;
+
+ return (value & mask) == mask;
+}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index e3edf81124..0ccb7614fa 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -60,6 +60,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state);
layer_state_t default_layer_state_set_keymap(layer_state_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
+bool hasAllBitsInMask(uint8_t value, uint8_t mask);
typedef union {
uint32_t raw;
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 0ae468a04e..cb7ec3ec40 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -14,21 +14,21 @@ enum userspace_custom_keycodes {
KC_DVORAK, // Sets default layer to DVORAK
KC_WORKMAN, // Sets default layer to WORKMAN
KC_DIABLO_CLEAR, // Clears all Diablo Timers
- KC_MAKE, // Run keyboard's customized make command
- KC_RGB_T, // Toggles RGB Layer Indication mode
- RGB_IDL, // RGB Idling animations
- KC_SECRET_1, // test1
- KC_SECRET_2, // test2
- KC_SECRET_3, // test3
- KC_SECRET_4, // test4
- KC_SECRET_5, // test5
- KC_CCCV, // Hold to copy, tap to paste
- KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
- UC_FLIP, // (ಠ痊ಠ)┻━┻
- UC_TABL, // ┬─┬ノ( º _ ºノ)
- UC_SHRG, // ¯\_(ツ)_/¯
- UC_DISA, // ಠ_ಠ
- NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
+ KC_MAKE, // Run keyboard's customized make command
+ KC_RGB_T, // Toggles RGB Layer Indication mode
+ RGB_IDL, // RGB Idling animations
+ KC_SECRET_1, // test1
+ KC_SECRET_2, // test2
+ KC_SECRET_3, // test3
+ KC_SECRET_4, // test4
+ KC_SECRET_5, // test5
+ KC_CCCV, // Hold to copy, tap to paste
+ KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
+ UC_FLIP, // (ಠ痊ಠ)┻━┻
+ UC_TABL, // ┬─┬ノ( º _ ºノ)
+ UC_SHRG, // ¯\_(ツ)_/¯
+ UC_DISA, // ಠ_ಠ
+ NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
};
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
@@ -57,9 +57,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
#define KC_RST KC_RESET
#ifdef SWAP_HANDS_ENABLE
-# define KC_C1R3 SH_TT
+# define KC_C1R3 SH_T(KC_TAB)
+#elif defined(DRASHNA_LP)
+# define KC_C1R3 TG(_GAMEPAD)
#else // SWAP_HANDS_ENABLE
-# define KC_C1R3 KC_BSPC
+# define KC_C1R3 KC_TAB
#endif // SWAP_HANDS_ENABLE
#define BK_LWER LT(_LOWER, KC_BSPC)
@@ -79,7 +81,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
#define OS_RCTL OSM(MOD_RCTL)
#define OS_LALT OSM(MOD_LALT)
#define OS_RALT OSM(MOD_RALT)
-#define OS_MEH OSM(MOD_MEH)
+#define OS_MEH OSM(MOD_MEH)
#define OS_HYPR OSM(MOD_HYPR)
#define ALT_APP ALT_T(KC_APP)
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 7b77a51d96..1b5a863850 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -4,8 +4,13 @@ SRC += drashna.c \
LINK_TIME_OPTIMIZATION_ENABLE = yes
SPACE_CADET_ENABLE = no
-ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
- SRC += secrets.c
+ifneq ($(strip $(NO_SECRETS)), yes)
+ ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
+ SRC += secrets.c
+ endif
+ ifeq ($(strip $(NO_SECRETS)), lite)
+ OPT_DEFS += -DNO_SECRETS
+ endif
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
@@ -14,9 +19,7 @@ endif
-ifeq ($(strip $(NO_SECRETS)), yes)
- OPT_DEFS += -DNO_SECRETS
-endif
+
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_stuff.c