summaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-26 17:59:49 -0700
committerGitHub <noreply@github.com>2021-07-26 17:59:49 -0700
commiteb46c954dcf99d842967cc6095827316ffddd291 (patch)
tree69f0a5ade629b63731c246888c0e067312e0970f /users/drashna
parent368efb5d2b834d995ba24cd23349327bab02918b (diff)
[Keymap] Drashna's Defaults cleanup (#13722)
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/config.h35
-rw-r--r--users/drashna/drashna.c30
-rw-r--r--users/drashna/drashna.h43
-rw-r--r--users/drashna/drashna_font.h161
-rw-r--r--users/drashna/oled_stuff.c39
-rw-r--r--users/drashna/oled_stuff.h2
-rw-r--r--users/drashna/process_records.c83
-rw-r--r--users/drashna/process_records.h103
-rw-r--r--users/drashna/rgb_matrix_stuff.c34
-rw-r--r--users/drashna/rgb_stuff.c94
-rw-r--r--users/drashna/rules.mk24
-rw-r--r--users/drashna/tap_dances.c8
-rw-r--r--users/drashna/tap_dances.h6
-rw-r--r--users/drashna/template.c6
-rw-r--r--users/drashna/template.h4
-rw-r--r--users/drashna/transport_sync.c17
-rw-r--r--users/drashna/wrappers.h194
17 files changed, 435 insertions, 448 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 445e180825..fbba210e7a 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -57,26 +57,35 @@
# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
# endif
-#endif // !AUDIO_ENABLE
+#endif // !AUDIO_ENABLE
#define UNICODE_SELECTED_MODES UC_WIN, UC_MAC
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_SLEEP
+# undef RGBLIGHT_ANIMATIONS
# if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
-# undef RGBLIGHT_ANIMATIONS
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_SNAKE
# define RGBLIGHT_EFFECT_KNIGHT
# else
-# define RGBLIGHT_ANIMATIONS
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_SNAKE
+# define RGBLIGHT_EFFECT_KNIGHT
+// # define RGBLIGHT_EFFECT_CHRISTMAS
+// # define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// # define RGBLIGHT_EFFECT_RGB_TEST
+// # define RGBLIGHT_EFFECT_ALTERNATING
+# define RGBLIGHT_EFFECT_TWINKLE
# endif
# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
-# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
@@ -120,8 +129,8 @@
# define DISABLE_RGB_MATRIX_MULTISPLASH
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# endif // AVR
-#endif // RGB_MATRIX_ENABLE
+# endif // AVR
+#endif // RGB_MATRIX_ENABLE
#ifdef OLED_DRIVER_ENABLE
# ifdef SPLIT_KEYBOARD
@@ -148,16 +157,16 @@
#ifndef ONESHOT_TAP_TOGGLE
# define ONESHOT_TAP_TOGGLE 2
-#endif // !ONESHOT_TAP_TOGGLE
+#endif // !ONESHOT_TAP_TOGGLE
#ifndef ONESHOT_TIMEOUT
# define ONESHOT_TIMEOUT 3000
-#endif // !ONESHOT_TIMEOUT
+#endif // !ONESHOT_TIMEOUT
#ifdef QMK_KEYS_PER_SCAN
# undef QMK_KEYS_PER_SCAN
# define QMK_KEYS_PER_SCAN 2
-#endif // !QMK_KEYS_PER_SCAN
+#endif // !QMK_KEYS_PER_SCAN
// this makes it possible to do rolling combos (zx) with keys that
// convert to other keys on hold (z becomes ctrl when you hold it,
@@ -167,7 +176,7 @@
#undef PERMISSIVE_HOLD
//#define TAPPING_FORCE_HOLD_PER_KEY
//#define RETRO_TAPPING_PER_KEY
-#ifndef KEYBOARD_kyria_rev1
+#if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria)
# define TAPPING_TERM_PER_KEY
#endif
@@ -179,7 +188,7 @@
#ifdef TAPPING_TERM
# undef TAPPING_TERM
-#endif // TAPPING_TERM
+#endif // TAPPING_TERM
#if defined(KEYBOARD_ergodox_ez)
# define TAPPING_TERM 185
#elif defined(KEYBOARD_crkbd)
@@ -293,4 +302,4 @@
# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
# endif
-#endif // MOUSEKEY_ENABLE
+#endif // MOUSEKEY_ENABLE
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index b54d0cfcc0..4cef5433d6 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -103,12 +103,12 @@ void shutdown_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
-#endif // RGB_MATRIX_ENABLE
+#endif // RGB_MATRIX_ENABLE
shutdown_keymap();
}
@@ -124,8 +124,12 @@ void suspend_power_down_user(void) {
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) {
- if (layer_state_is(_GAMEPAD)) { layer_off(_GAMEPAD); }
- if (layer_state_is(_DIABLO)) { layer_off(_DIABLO); }
+ if (layer_state_is(_GAMEPAD)) {
+ layer_off(_GAMEPAD);
+ }
+ if (layer_state_is(_DIABLO)) {
+ layer_off(_DIABLO);
+ }
suspend_wakeup_init_keymap();
}
@@ -142,13 +146,13 @@ void matrix_scan_user(void) {
startup_user();
}
-#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
+#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
matrix_scan_rgb_light();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#if defined(RGB_MATRIX_ENABLE)
matrix_scan_rgb_matrix();
#endif
@@ -167,13 +171,15 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state)
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
layer_state_t layer_state_set_user(layer_state_t state) {
- if (!is_keyboard_master()) { return state; }
+ if (!is_keyboard_master()) {
+ return state;
+ }
state = layer_state_set_keymap(state);
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#if defined(RGBLIGHT_ENABLE)
state = layer_state_set_rgb_light(state);
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#if defined(AUDIO_ENABLE) && !defined(__arm__)
static bool is_gamepad_on = false;
if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
@@ -192,13 +198,15 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) {
- if (!is_keyboard_master()) { return state; }
+ if (!is_keyboard_master()) {
+ return state;
+ }
state = default_layer_state_set_keymap(state);
#if 0
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
state = default_layer_state_set_rgb(state);
-# endif // RGBLIGHT_ENABLE
+# endif // RGBLIGHT_ENABLE
#endif
return state;
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index f1d756f742..ca849b0509 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -22,7 +22,7 @@
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
# include "tap_dances.h"
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
# include "rgb_stuff.h"
#endif
@@ -41,25 +41,44 @@
/* Define layer names */
enum userspace_layers {
- _QWERTY = 0,
- _NUMLOCK = 0,
+ _QWERTY = 0,
+ _NUMLOCK = 0,
+ FIRST_DEFAULT_LAYER = 0,
+ _COLEMAK_DH,
_COLEMAK,
_DVORAK,
- _WORKMAN,
- _NORMAN,
- _MALTRON,
- _EUCALYN,
- _CARPLAX,
+ LAST_DEFAULT_LAYER = _DVORAK,
_GAMEPAD,
_DIABLO,
- _MACROS,
+ _MOUSE,
_MEDIA,
_LOWER,
_RAISE,
_ADJUST,
};
-#define _MOUSE _MACROS
+#define _MACROS _MOUSE
+#define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER
+#define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1)
+#define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2)
+#define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 3)
+#if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 3)
+# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 4)
+# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 5)
+# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 6)
+# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 7)
+# if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 7)
+# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 8)
+# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 9)
+# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 10)
+# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 11)
+# endif
+#endif
+
+#define DEFAULT_LAYER_1_HSV HSV_CYAN
+#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN
+#define DEFAULT_LAYER_3_HSV HSV_MAGENTA
+#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
@@ -101,12 +120,12 @@ We use custom codes here, so we can substitute the right stuff
# define KC_D3_2 TD(TD_D3_2)
# define KC_D3_3 TD(TD_D3_3)
# define KC_D3_4 TD(TD_D3_4)
-#else // TAP_DANCE_ENABLE
+#else // TAP_DANCE_ENABLE
# define KC_D3_1 KC_1
# define KC_D3_2 KC_2
# define KC_D3_3 KC_3
# define KC_D3_4 KC_4
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#if defined(DRASHNA_CUSTOM_TRANSPORT) && defined(POINTING_DEVICE_ENABLE)
void master_mouse_send(int8_t x, int8_t y);
diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h
index 46ebf3710a..e9353e62a9 100644
--- a/users/drashna/drashna_font.h
+++ b/users/drashna/drashna_font.h
@@ -3,7 +3,10 @@
// additional fonts from
// https://github.com/datacute/TinyOLED-Fonts
-#include "progmem.h"
+#if __has_include("../../../../Documents/qmk/oled_font.h")
+# include "../../../../Documents/qmk/oled_font.h"
+#else
+# include "progmem.h"
// clang-format off
static const unsigned char font[] PROGMEM = {
@@ -39,7 +42,7 @@ static const unsigned char font[] PROGMEM = {
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31
-#if defined(OLED_FONT_5X5)
+# if defined(OLED_FONT_5X5)
0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 !
0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 "
@@ -136,7 +139,7 @@ static const unsigned char font[] PROGMEM = {
0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 }
0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~
0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
-#elif defined(OLED_FONT_AZTECH)
+# lif defined(OLED_FONT_AZTECH)
0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 !
0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 "
@@ -233,7 +236,7 @@ static const unsigned char font[] PROGMEM = {
0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 }
0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~
0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
-#elif defined(OLED_FONT_BMPLAIN)
+# elif defined(OLED_FONT_BMPLAIN)
0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 !
0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 "
@@ -330,7 +333,7 @@ static const unsigned char font[] PROGMEM = {
0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 }
0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~
0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
-#elif defined(OLED_FONT_SUPER_DIGG)
+# elif defined(OLED_FONT_SUPER_DIGG)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32
0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 !
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 "
@@ -427,7 +430,7 @@ static const unsigned char font[] PROGMEM = {
0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 }
0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~
0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127
-#else // default font
+# else // default font
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 !
0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 "
@@ -524,9 +527,9 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 }
0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127
-#endif
+# endif
-#if defined(OLED_LOGO_GMK_BAD)
+# if defined(OLED_LOGO_GMK_BAD)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81
0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82
@@ -655,7 +658,7 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- #elif defined(OLED_LOGO_HUE_MANITEE)
+# elif defined(OLED_LOGO_HUE_MANITEE)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0,
0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4,
@@ -784,7 +787,7 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- #elif defined(OLED_LOGO_CORNE)
+# elif defined(OLED_LOGO_CORNE)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
@@ -914,7 +917,7 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-#elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c
+# elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
0x00, 0x00, 0xC0, 0x60, 0x30, 0x18,
0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C,
@@ -1043,137 +1046,7 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-#elif defined(OLED_LOGO_SCIFI)
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0x60,
- 0x70, 0x30, 0x38, 0x18, 0x0C, 0x0C,
- 0x1E, 0x0C, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0xC0, 0xE0, 0xF0, 0x38, 0x1C, 0x0E,
- 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x00, 0x00, 0x80, 0x40, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x80, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0,
- 0xC0, 0x60, 0x60, 0x30, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
- 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
- 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
- 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
- 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
- 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
- 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
- 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
- 0x30, 0x30, 0x70, 0x78, 0x78, 0x7C,
- 0x7C, 0x7E, 0x3E, 0x3F, 0x3F, 0x3B,
- 0x3B, 0x39, 0x39, 0x38, 0x38, 0x38,
- 0x38, 0x38, 0x38, 0x38, 0x3C, 0x38,
- 0x18, 0x8F, 0xDF, 0xF8, 0x7C, 0xBE,
- 0xDF, 0xF7, 0xFB, 0xFD, 0xFE, 0xEF,
- 0x73, 0x3B, 0x1B, 0x1F, 0xEF, 0xF7,
- 0xFF, 0x7E, 0x6F, 0x6F, 0x6F, 0x6F,
- 0x6D, 0xBD, 0xE1, 0xF9, 0x3F, 0x3F,
- 0x39, 0x79, 0x79, 0x7D, 0xED, 0xED,
- 0xCD, 0xC7, 0xC7, 0x87, 0xC7, 0xE3,
- 0xE0, 0xF8, 0x7E, 0x3F, 0x37, 0x33,
- 0x3B, 0x1B, 0x19, 0x19, 0x0D, 0xED,
- 0xFF, 0xBF, 0xC7, 0xE7, 0xE3, 0xF0,
- 0x7C, 0xDE, 0xE7, 0xFB, 0x3E, 0x3F,
- 0xFC, 0xE0, 0xF8, 0x3E, 0xCF, 0xF3,
- 0xFC, 0x3F, 0x1F, 0x1F, 0x3C, 0x7E,
- 0x76, 0xF3, 0xE3, 0x81, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
- 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
- 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
- 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
- 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
- 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
- 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
- 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x30, 0x18, 0x1E,
- 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x03, 0x03, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x03, 0x07, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0xE1, 0x79, 0x3E, 0x1F,
- 0x07, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x03,
- 0x02, 0x06, 0x04, 0x08, 0x18, 0x10,
- 0x30, 0x20, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F,
- 0x00, 0x14, 0x08, 0x14, 0x00, 0x00,
- 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F,
- 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00,
- 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C,
- 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00,
- 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C,
- 0x18, 0x30, 0x66, 0x66, 0x66, 0x00,
- 0x00, 0x00, 0x00, 0x08, 0x0C, 0x7E,
- 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00,
- 0x00, 0x00, 0x77, 0x77, 0x77, 0x00,
- 0x77, 0x77, 0x77, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24,
- 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00,
- 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1,
- 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00,
- 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED,
- 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F,
- 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64,
- 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x42, 0x69, 0x65, 0x65,
- 0x65, 0x69, 0x42, 0x04, 0x00, 0x00,
- 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08,
- 0x18, 0x08, 0x18, 0x00, 0x00, 0x00,
- 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-#else
+# else
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
@@ -1303,7 +1176,7 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-#endif
+# endif
};
-
// clang-format on
+#endif
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 253c5181ee..b2f49a2e7e 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -25,7 +25,7 @@
#endif
uint32_t oled_timer = 0;
-static char keylog_str[KEYLOGGER_LENGTH + 1] = { 0 };
+static char keylog_str[KEYLOGGER_LENGTH + 1] = {0};
static uint16_t log_timer = 0;
// clang-format off
@@ -58,7 +58,7 @@ void add_keylog(uint16_t keycode) {
}
for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) {
- keylog_str[i-1] = keylog_str[i];
+ keylog_str[i - 1] = keylog_str[i];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
@@ -92,14 +92,18 @@ void render_keylogger_status(void) {
void render_default_layer_state(void) {
oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false);
switch (get_highest_layer(default_layer_state)) {
- case _QWERTY: oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); break;
- case _COLEMAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); break;
- case _DVORAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); break;
- case _WORKMAN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false); break;
- case _NORMAN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false); break;
- case _MALTRON: oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false); break;
- case _EUCALYN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false); break;
- case _CARPLAX: oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false); break;
+ case _QWERTY:
+ oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false);
+ break;
+ case _COLEMAK_DH:
+ oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false);
+ break;
+ case _COLEMAK:
+ oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false);
+ break;
+ case _DVORAK:
+ oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false);
+ break;
}
#ifdef OLED_DISPLAY_128X64
oled_advance_page(true);
@@ -336,8 +340,8 @@ void render_status_secondary(void) {
render_default_layer_state();
render_layer_state();
render_mod_status(get_mods() | get_oneshot_mods());
- // render_keylogger_status();
- render_keylock_status(host_keyboard_leds());
+
+ // render_keylock_status(host_keyboard_leds());
}
void render_status_main(void) {
@@ -360,7 +364,7 @@ void render_status_main(void) {
render_bootmagic_status();
render_user_status();
- render_keylogger_status();
+ // render_keylogger_status();
}
__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; }
@@ -382,8 +386,15 @@ void oled_task_user(void) {
} else {
oled_on();
}
- render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ }
+ if (is_keyboard_left()) {
+ render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_status_secondary();
}
+ if (is_keyboard_master()) {
+ render_keylogger_status();
+ } else {
+ render_keylock_status(host_keyboard_leds());
+ }
}
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h
index ad9cf09ed2..bba3f39cbc 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -29,6 +29,7 @@ extern uint32_t oled_timer;
# define OLED_RENDER_LAYOUT_NAME "Layout: "
# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
+# define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak-DH"
# define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
# define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
@@ -73,6 +74,7 @@ extern uint32_t oled_timer;
# define OLED_RENDER_LAYOUT_NAME "Lyout"
# define OLED_RENDER_LAYOUT_QWERTY " QRTY"
+# define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH"
# define OLED_RENDER_LAYOUT_COLEMAK " COLE"
# define OLED_RENDER_LAYOUT_DVORAK " DVRK"
# define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 124354a5bc..1e6ecc1d6c 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -29,10 +29,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef KEYLOGGER_ENABLE
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
-#endif // KEYLOGGER_ENABLE
+#endif // KEYLOGGER_ENABLE
#ifdef OLED_DRIVER_ENABLE
process_record_user_oled(keycode, record);
-#endif // OLED
+#endif // OLED
if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
#ifdef RGB_MATRIX_ENABLE
@@ -46,20 +46,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
switch (keycode) {
- case KC_QWERTY ... KC_WORKMAN:
+ case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE:
if (record->event.pressed) {
uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
if (!mods) {
- set_single_persistent_default_layer(keycode - KC_QWERTY);
+ set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE);
+#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3)
} else if (mods & MOD_MASK_SHIFT) {
- set_single_persistent_default_layer(keycode - KC_QWERTY + 4);
+ set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4);
+# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7)
+
} else if (mods & MOD_MASK_CTRL) {
- set_single_persistent_default_layer(keycode - KC_QWERTY + 8);
+ set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8);
+# endif
+#endif
}
}
break;
- case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
+ case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
if (!record->event.pressed) {
#ifndef MAKE_BOOTLOADER
uint8_t temp_mod = mod_config(get_mods());
@@ -79,55 +84,63 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY);
-#ifdef RGB_MATRIX_SPLIT_RIGHT
- send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY);
-# ifndef OLED_DRIVER_ENABLE
- send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY);
-# endif
+#ifdef CONVERT_TO_PROTON_C
+ send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY);
#endif
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
}
-
break;
- case VRSN: // Prints firmware version
- if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); }
+ case VRSN: // Prints firmware version
+ if (record->event.pressed) {
+ send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
+ }
break;
- case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
+ case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
#ifdef TAP_DANCE_ENABLE
if (record->event.pressed) {
- for (uint8_t index = 0; index < 4; index++) { diablo_timer[index].key_interval = 0; }
+ for (uint8_t index = 0; index < 4; index++) {
+ diablo_timer[index].key_interval = 0;
+ }
}
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
break;
- case KC_CCCV: // One key copy/paste
+ case KC_CCCV: // One key copy/paste
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
- if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
tap_code16(LCTL(KC_C));
- } else { // Tap, paste
+ } else { // Tap, paste
tap_code16(LCTL(KC_V));
}
}
break;
#ifdef UNICODE_ENABLE
- case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
- if (record->event.pressed) { send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); }
+ case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
+ if (record->event.pressed) {
+ send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
+ }
break;
- case UC_TABL: // ┬─┬ノ( º _ ºノ)
- if (record->event.pressed) { send_unicode_string("┬─┬ノ( º _ ºノ)"); }
+ case UC_TABL: // ┬─┬ノ( º _ ºノ)
+ if (record->event.pressed) {
+ send_unicode_string("┬─┬ノ( º _ ºノ)");
+ }
break;
- case UC_SHRG: // ¯\_(ツ)_/¯
- if (record->event.pressed) { send_unicode_string("¯\\_(ツ)_/¯"); }
+ case UC_SHRG: // ¯\_(ツ)_/¯
+ if (record->event.pressed) {
+ send_unicode_string("¯\\_(ツ)_/¯");
+ }
break;
- case UC_DISA: // ಠ_ಠ
- if (record->event.pressed) { send_unicode_string("ಠ_ಠ"); }
+ case UC_DISA: // ಠ_ಠ
+ if (record->event.pressed) {
+ send_unicode_string("ಠ_ಠ");
+ }
break;
#endif
- case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
+ case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
if (record->event.pressed) {
userspace_config.rgb_layer_change ^= 1;
@@ -137,14 +150,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
rgblight_enable_noeeprom();
# endif
- layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
+ layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
} else {
rgblight_disable_noeeprom();
# endif
}
}
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
break;
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
@@ -164,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
- case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
+ case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
if (record->event.pressed) {
bool is_eeprom_updated;
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
@@ -182,7 +195,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
is_eeprom_updated = true;
}
# endif
- if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); }
+ if (is_eeprom_updated) {
+ eeconfig_update_user(userspace_config.raw);
+ }
}
#endif
}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index f65cfc03c1..460d41d4df 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -24,51 +24,70 @@
#endif
enum userspace_custom_keycodes {
- VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
- KC_QWERTY, // Sets default layer to QWERTY
- KC_COLEMAK, // Sets default layer to COLEMAK
- 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
+ VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info