aboutsummaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-10-16 13:11:22 -0700
committerGitHub <noreply@github.com>2019-10-16 13:11:22 -0700
commite3a21348c3879c11072c7c42d3b4d04b022f4fe2 (patch)
treeb4b007bce3d0b9167dfe651a537df330dbf7bead /users/drashna
parent7662ee71f0d1df7cee03a563f52dba21854fd0be (diff)
downloadqmk_firmware-e3a21348c3879c11072c7c42d3b4d04b022f4fe2.tar.gz
qmk_firmware-e3a21348c3879c11072c7c42d3b4d04b022f4fe2.zip
[Keymap] Drashna's Hardware Features Experimentations (#6920)
* Change RGBLight pin for Planck Light Move it to A0, so that the SPI? pins are available for BT hackery * Add QMK DFU bootloader info * Add Solenoid * Disable annoying white LED on bottom * Enable Solenoid on Corne * Remove bounds for animations * Increase debounce for Ergodox EZ to reduce repeat key issues * Set swap hands key to be a hold-tap key This way, it's not ANNOYING and doesn't swap the hands inteniontally * Move MT Alt in Corne keymap * Re-Add fine tuned control of secrets * Squash mods to single row * Add LRA settings to haptic feedback settings for Rev6 * Fix issue with non-Planck EZ keymaps * Add 40 Percent Nano with Analog Joystick * Add Collide39 keymap * Fix OLED printing to be more flavorful * Fix up Iris GamePad and come cleanup * Expand OLED char map further * Add modded characters to keylogger * Here be dragons Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix up rules for community layouts * Some more OLED tweaks * Add mod mask check function * Change QMK DFU Audio pin to be correct * Use manual STM config instead of CTPC for Collide 39
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 6a436e0af..b48d837d0 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -219,3 +219,10 @@ void eeconfig_init_user(void) {
219 eeconfig_init_keymap(); 219 eeconfig_init_keymap();
220 keyboard_init(); 220 keyboard_init();
221} 221}
222
223bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
224 value &= 0xF;
225 mask &= 0xF;
226
227 return (value & mask) == mask;
228}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index e3edf8112..0ccb7614f 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);
60layer_state_t default_layer_state_set_keymap(layer_state_t state); 60layer_state_t default_layer_state_set_keymap(layer_state_t state);
61void led_set_keymap(uint8_t usb_led); 61void led_set_keymap(uint8_t usb_led);
62void eeconfig_init_keymap(void); 62void eeconfig_init_keymap(void);
63bool hasAllBitsInMask(uint8_t value, uint8_t mask);
63 64
64typedef union { 65typedef union {
65 uint32_t raw; 66 uint32_t raw;
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 0ae468a04..cb7ec3ec4 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -14,21 +14,21 @@ enum userspace_custom_keycodes {
14 KC_DVORAK, // Sets default layer to DVORAK 14 KC_DVORAK, // Sets default layer to DVORAK
15 KC_WORKMAN, // Sets default layer to WORKMAN 15 KC_WORKMAN, // Sets default layer to WORKMAN
16 KC_DIABLO_CLEAR, // Clears all Diablo Timers 16 KC_DIABLO_CLEAR, // Clears all Diablo Timers
17 KC_MAKE, // Run keyboard's customized make command 17 KC_MAKE, // Run keyboard's customized make command
18 KC_RGB_T, // Toggles RGB Layer Indication mode 18 KC_RGB_T, // Toggles RGB Layer Indication mode
19 RGB_IDL, // RGB Idling animations 19 RGB_IDL, // RGB Idling animations
20 KC_SECRET_1, // test1 20 KC_SECRET_1, // test1
21 KC_SECRET_2, // test2 21 KC_SECRET_2, // test2
22 KC_SECRET_3, // test3 22 KC_SECRET_3, // test3
23 KC_SECRET_4, // test4 23 KC_SECRET_4, // test4
24 KC_SECRET_5, // test5 24 KC_SECRET_5, // test5
25 KC_CCCV, // Hold to copy, tap to paste 25 KC_CCCV, // Hold to copy, tap to paste
26 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! 26 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
27 UC_FLIP, // (ಠ痊ಠ)┻━┻ 27 UC_FLIP, // (ಠ痊ಠ)┻━┻
28 UC_TABL, // ┬─┬ノ( º _ ºノ) 28 UC_TABL, // ┬─┬ノ( º _ ºノ)
29 UC_SHRG, // ¯\_(ツ)_/¯ 29 UC_SHRG, // ¯\_(ツ)_/¯
30 UC_DISA, // ಠ_ಠ 30 UC_DISA, // ಠ_ಠ
31 NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes 31 NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
32}; 32};
33 33
34bool process_record_secrets(uint16_t keycode, keyrecord_t *record); 34bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
@@ -57,9 +57,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
57#define KC_RST KC_RESET 57#define KC_RST KC_RESET
58 58
59#ifdef SWAP_HANDS_ENABLE 59#ifdef SWAP_HANDS_ENABLE
60# define KC_C1R3 SH_TT 60# define KC_C1R3 SH_T(KC_TAB)
61#elif defined(DRASHNA_LP)
62# define KC_C1R3 TG(_GAMEPAD)
61#else // SWAP_HANDS_ENABLE 63#else // SWAP_HANDS_ENABLE
62# define KC_C1R3 KC_BSPC 64# define KC_C1R3 KC_TAB
63#endif // SWAP_HANDS_ENABLE 65#endif // SWAP_HANDS_ENABLE
64 66
65#define BK_LWER LT(_LOWER, KC_BSPC) 67#define BK_LWER LT(_LOWER, KC_BSPC)
@@ -79,7 +81,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
79#define OS_RCTL OSM(MOD_RCTL) 81#define OS_RCTL OSM(MOD_RCTL)
80#define OS_LALT OSM(MOD_LALT) 82#define OS_LALT OSM(MOD_LALT)
81#define OS_RALT OSM(MOD_RALT) 83#define OS_RALT OSM(MOD_RALT)
82#define OS_MEH OSM(MOD_MEH) 84#define OS_MEH OSM(MOD_MEH)
83#define OS_HYPR OSM(MOD_HYPR) 85#define OS_HYPR OSM(MOD_HYPR)
84 86
85#define ALT_APP ALT_T(KC_APP) 87#define ALT_APP ALT_T(KC_APP)
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 7b77a51d9..1b5a86385 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -4,8 +4,13 @@ SRC += drashna.c \
4LINK_TIME_OPTIMIZATION_ENABLE = yes 4LINK_TIME_OPTIMIZATION_ENABLE = yes
5SPACE_CADET_ENABLE = no 5SPACE_CADET_ENABLE = no
6 6
7ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") 7ifneq ($(strip $(NO_SECRETS)), yes)
8 SRC += secrets.c 8 ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
9 SRC += secrets.c
10 endif
11 ifeq ($(strip $(NO_SECRETS)), lite)
12 OPT_DEFS += -DNO_SECRETS
13 endif
9endif 14endif
10 15
11ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) 16ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
@@ -14,9 +19,7 @@ endif
14 19
15 20
16 21
17ifeq ($(strip $(NO_SECRETS)), yes) 22
18 OPT_DEFS += -DNO_SECRETS
19endif
20 23
21ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 24ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
22 SRC += rgb_stuff.c 25 SRC += rgb_stuff.c