summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h3
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c14
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk3
-rw-r--r--keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c26
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c39
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/keymap.c2
-rw-r--r--keyboards/moonlander/keymaps/drashna/keymap.c4
-rw-r--r--keyboards/ploopyco/mouse/keymaps/drashna/keymap.c9
-rw-r--r--keyboards/splitkb/kyria/keymaps/drashna/config.h25
-rw-r--r--keyboards/splitkb/kyria/keymaps/drashna/keymap.c36
-rw-r--r--layouts/community/ergodox/drashna/keymap.c2
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c28
-rw-r--r--layouts/community/split_3x6_3/drashna/keymap.c32
-rw-r--r--users/drashna/audio_config.h33
-rw-r--r--users/drashna/callbacks.c127
-rw-r--r--users/drashna/config.h44
-rw-r--r--users/drashna/drashna.c51
-rw-r--r--users/drashna/drashna.h6
-rw-r--r--users/drashna/keyrecords/capwords.md36
-rw-r--r--users/drashna/keyrecords/process_records.c35
-rw-r--r--users/drashna/keyrecords/process_records.h9
-rw-r--r--users/drashna/keyrecords/readme.md2
-rw-r--r--users/drashna/oled/oled_stuff.c58
-rw-r--r--users/drashna/oled/oled_stuff.h9
-rw-r--r--users/drashna/oled/sh110x.c113
-rw-r--r--users/drashna/pointing/pointing.c11
-rw-r--r--users/drashna/pointing/pointing_config.h6
-rw-r--r--users/drashna/post_config.h2
-rw-r--r--users/drashna/rgb/rgb_matrix_stuff.c5
-rw-r--r--users/drashna/rgb/rgb_matrix_stuff.h2
-rw-r--r--users/drashna/rules.mk5
-rw-r--r--users/drashna/split/split_config.h12
-rw-r--r--users/drashna/split/transport_sync.c2
-rw-r--r--users/drashna/split/transport_sync.h2
34 files changed, 453 insertions, 340 deletions
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
index cb11ea2748..07c4bfc008 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
@@ -37,6 +37,9 @@
# undef POINTING_DEVICE_CS_PIN
# define POINTING_DEVICE_CS_PIN A15 // b14
# define PMW33XX_LIFTOFF_DISTANCE 0b1111
+
+# define RGB_MATRIX_LED_FLUSH_LIMIT 33
+# define RGB_MATRIX_LED_PROCESS_LIMIT 29
#endif
#undef ROTATIONAL_TRANSFORM_ANGLE
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
index 50a05e1b35..85bb2bc77f 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
@@ -16,6 +16,7 @@
*/
#include "drashna.h"
+// clang-format off
#define LAYOUT_charybdis_4x6_wrapper(...) LAYOUT_charybdis_4x6(__VA_ARGS__)
#define LAYOUT_charybdis_4x6_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -26,14 +27,13 @@
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_CLUE, \
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
- OS_LSFT,CTL_T(K21), K22, K23, K24, K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
+ OS_LSFT,CTL_T(K21),ALT_T(K22),GUI_T(K23),K24,K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
SFT_T(KC_GRV), OS_LALT, OS_LGUI, TT(_MOUSE), KC_ENT, \
KC_SPC, BK_LWER, DL_RAIS \
)
#define LAYOUT_base_wrapper(...) LAYOUT_charybdis_4x6_base(__VA_ARGS__)
-// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
@@ -120,13 +120,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-
void keyboard_post_init_keymap(void) {
#ifdef RGB_MATRIX_ENABLE
- g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] =
- g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] =
- g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] =
- LED_FLAG_MODIFIER;
+ g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] = g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] = g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] = LED_FLAG_MODIFIER;
#endif
}
@@ -171,8 +167,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
- {{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}},
- };
+ {{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}}
+};
# ifdef ENCODER_MAP_ENABLE
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
index 12e9cecda0..0b7759f156 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
@@ -37,8 +37,7 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes)
NKRO_ENABLE = yes # Enable N-Key Rollover
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
- KEYBOARD_SHARED_EP = yes
- MOUSE_SHARED_EP = yes
+ MOUSE_SHARED_EP = no
AUTOCORRECT_ENABLE = yes
CAPS_WORD_ENABLE = yes
diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c
index d4aa71440d..d80d006796 100644
--- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c
+++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c
@@ -133,14 +133,24 @@ bool oled_task_keymap(void) {
// render_rgb_hsv(1, 13);
oled_set_cursor(1, 13);
- // oled_write_P(PSTR("Timer:"), false);
- // oled_write(get_u8_str((uint8_t)(timer_elapsed32(oled_timer) / 1000), ' '), false);
- oled_write_P(PSTR("Status: "), false);
- if (is_oled_enabled) {
- oled_write_P(PSTR("on "), false);
- } else {
- oled_write_P(PSTR("off"), false);
- }
+ oled_write_P(PSTR("OS: "), false);
+ extern os_variant_t os_type;
+ switch (os_type) {
+ case OS_LINUX:
+ oled_write_ln_P(PSTR("Linux"), false);
+ break;
+ case OS_WINDOWS:
+ oled_write_ln_P(PSTR("Windows"), false);
+ break;
+ case OS_MACOS:
+ oled_write_ln_P(PSTR("MacOS"), false);
+ break;
+ case OS_IOS:
+ oled_write_ln_P(PSTR("iOS"), false);
+ break;
+ default:
+ break;
+ }
render_keylogger_status(1, 14);
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
index afcc9b0a7a..4412130df8 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -130,25 +130,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, KC_NUKE, _______
),
};
-
+// clang-format on
#ifdef ENCODER_ENABLE
-#ifdef ENCODER_MAP_ENABLE
+# ifdef ENCODER_MAP_ENABLE
+// clang-format off
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
- [_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
- [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
- [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
- [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
- [_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
- [_DIABLO] = { { _______, _______ }, { _______, _______ } },
- [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
- [_MEDIA] = { { _______, _______ }, { _______, _______ } },
- [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
- [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
- [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
+ [_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+ [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DEFAULT_LAYER_3] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DEFAULT_LAYER_4] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+ [_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
+ [_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
+ [_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
};
// clang-format on
-#else
+# else
deferred_token encoder_token = INVALID_DEFERRED_TOKEN;
static int8_t last_direction = -1;
@@ -160,11 +161,11 @@ static uint32_t encoder_callback(uint32_t trigger_time, void *cb_arg) {
}
bool encoder_update_user(uint8_t index, bool clockwise) {
-# ifdef SWAP_HANDS_ENABLE
+# ifdef SWAP_HANDS_ENABLE
if (swap_hands) {
index ^= 1;
}
-# endif
+# endif
if (index == 0) {
tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5);
} else if (index == 1) {
@@ -185,7 +186,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
return false;
}
-#endif
+# endif
#endif
#ifdef OLED_ENABLE
@@ -214,4 +215,8 @@ void oled_render_large_display(bool side) {
render_unicode_mode(1, 14);
}
}
+
+void render_oled_title(bool side) {
+ oled_write_P(side ? PSTR(" Tractyl ") : PSTR(" Manuform "), true);
+}
#endif
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
index 4e393e4196..9b33f35e0e 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
@@ -20,7 +20,7 @@
#define TT_MDIA TT(_MEDIA)
// enum more_custom_keycodes {
-// KC_P00 = NEW_SAFE_RANGE
+// KC_P00 = USER_SAFE_RANGE
//};
// clang-format off
diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c
index e38a2828fe..2f38ac790c 100644
--- a/keyboards/moonlander/keymaps/drashna/keymap.c
+++ b/keyboards/moonlander/keymaps/drashna/keymap.c
@@ -16,7 +16,9 @@
#include "drashna.h"
-enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
+enum more_custom_keycodes {
+ KC_SWAP_NUM = USER_SAFE_RANGE,
+};
// clang-format off
#define LAYOUT_moonlander_wrapper(...) LAYOUT_moonlander(__VA_ARGS__)
diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c
index cf0b57d433..a249ebdfd9 100644
--- a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c
+++ b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c
@@ -17,6 +17,8 @@
*/
#include QMK_KEYBOARD_H
+// safe range starts at `USER_SAFE_RANGE` instead.
+
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
@@ -26,6 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+ [1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
+};
+#endif
+
#ifdef RGBLIGHT_ENABLE
void eeconkfig_init_user(void) {
rgblight_enable();
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/config.h b/keyboards/splitkb/kyria/keymaps/drashna/config.h
index ffd17ebd8f..2d1fbdcb02 100644
--- a/keyboards/splitkb/kyria/keymaps/drashna/config.h
+++ b/keyboards/splitkb/kyria/keymaps/drashna/config.h
@@ -41,14 +41,21 @@
#define QMK_ESC_INPUT D4
#define QMK_ESC_OUTPUT B2
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 7
-#define BOOTMAGIC_LITE_ROW_RIGHT 4
-#define BOOTMAGIC_LITE_COLUMN_RIGHT 7
-
-#define BOOTMAGIC_LITE_EEPROM_ROW 1
-#define BOOTMAGIC_LITE_EEPROM_COLUMN 7
-#define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
-#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
+#ifndef KEYBOARD_splitkb_kyria_rev3
+# define BOOTMAGIC_LITE_ROW 0
+# define BOOTMAGIC_LITE_COLUMN 7
+# define BOOTMAGIC_LITE_ROW_RIGHT 4
+# define BOOTMAGIC_LITE_COLUMN_RIGHT 7
+
+# define BOOTMAGIC_LITE_EEPROM_ROW 1
+# define BOOTMAGIC_LITE_EEPROM_COLUMN 7
+# define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
+# define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
+#endif
#define SERIAL_USART_SPEED 921600
+
+#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c)
+# define WEAR_LEVELING_BACKING_SIZE 16384
+# define WEAR_LEVELING_LOGICAL_SIZE 8192
+#endif
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
index 8c028985ef..178d3f2480 100644
--- a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
@@ -105,34 +105,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
- [_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
- [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
- [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
- [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
- [_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
- [_DIABLO] = { { _______, _______ }, { _______, _______ } },
- [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
- [_MEDIA] = { { _______, _______ }, { _______, _______ } },
- [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
- [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
- [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
+ [_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+ [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+ [_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+ [_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
+ [_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
+ [_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
};
#endif
// clang-format on
#ifdef OLED_ENABLE
+void render_oled_title(bool side) {
+ oled_write_P(side ? PSTR(" Splitkb ") : PSTR(" Kyria "), true);
+}
+
oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
-#ifdef OLED_DRIVER_SH1107
+# ifdef OLED_DRIVER_SH1107
return OLED_ROTATION_0;
-#else
+# else
return OLED_ROTATION_180;
-#endif
+# endif
}
void oled_render_large_display(bool side) {
if (side) {
render_wpm_graph(56, 64);
} else {
+ // clang-format off
static const char PROGMEM kyria_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -144,7 +149,7 @@ void oled_render_large_display(bool side) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// clang-format on
- oled_set_cursor(0,7);
+ oled_set_cursor(0, 7);
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
}
@@ -171,7 +176,6 @@ void housekeeping_task_keymap(void) {
}
#endif
-
#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
for (int32_t i = 0; i < 40; i++) {
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index e5675854e1..846bbc2351 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -17,7 +17,7 @@
#include "drashna.h"
enum more_custom_keycodes {
- KC_SWAP_NUM = NEW_SAFE_RANGE,
+ KC_SWAP_NUM = USER_SAFE_RANGE,
PM_SCROLL,
PM_PRECISION,
};
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index b22401a77e..d5faf7f7c8 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -16,19 +16,11 @@
#include "drashna.h"
-#ifdef BACKLIGHT_ENABLE
+#define BACKLIT OSM(MOD_LSFT)
enum planck_keycodes {
- BACKLIT = NEW_SAFE_RANGE,
- TH_LVL,
+ TH_LVL = USER_SAFE_RANGE,
};
-#else
-# define BACKLIT OSM(MOD_LSFT)
-enum planck_keycodes {
- TH_LVL = NEW_SAFE_RANGE,
-};
-#endif
-
#ifdef KEYBOARD_planck_ez
# define PLNK_1 BK_LWER
# define PLNK_2 SP_LWER
@@ -56,10 +48,10 @@ enum planck_keycodes {
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
LAYOUT_ortho_4x12_wrapper( \
- KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
+ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, PRINT_SETUPS, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
- BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ STORE_SETUPS, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
)
#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
@@ -130,18 +122,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
-#ifdef BACKLIGHT_ENABLE
- case BACKLIT:
- if (record->event.pressed) {
- register_code(KC_RSFT);
-# ifdef BACKLIGHT_ENABLE
- backlight_step();
-# endif
- } else {
- unregister_code(KC_RSFT);
- }
- break;
-#endif
#ifdef KEYBOARD_planck_ez
case TH_LVL:
if (record->event.pressed) {
diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c
index 7e051b6b5c..257e033f22 100644
--- a/layouts/community/split_3x6_3/drashna/keymap.c
+++ b/layouts/community/split_3x6_3/drashna/keymap.c
@@ -16,7 +16,9 @@
#include "drashna.h"
-enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
+enum crkbd_keycodes {
+ RGBRST = USER_SAFE_RANGE,
+};
/*
* The `LAYOUT_crkbd_base` macro is a template to allow the use of identical
@@ -96,33 +98,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
#ifdef OLED_ENABLE
-oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; }
+oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
+ return OLED_ROTATION_270;
+}
# ifdef CONVERT_TO_PROTON_C
// WPM-responsive animation stuff here
# define SLEEP_FRAMES 2
-# define SLEEP_SPEED 10 // below this wpm value your animation will idle
+# define SLEEP_SPEED 10 // below this wpm value your animation will idle
-# define WAKE_FRAMES 2 // uncomment if >1
+# define WAKE_FRAMES 2 // uncomment if >1
-# define KAKI_FRAMES 3
-# define KAKI_SPEED 40 // above this wpm value typing animation to triggere
+# define KAKI_FRAMES 3
+# define KAKI_SPEED 40 // above this wpm value typing animation to triggere
# define RTOGI_FRAMES 2
-//#define LTOGI_FRAMES 2
+// #define LTOGI_FRAMES 2
-//#define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
-// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
-# define ANIM_SIZE 512 // number of bytes in array, minimize for adequate firmware size, max is 1024
+// #define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
+// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
+# define ANIM_SIZE 512 // number of bytes in array, minimize for adequate firmware size, max is 1024
uint32_t anim_timer = 0;
uint32_t anim_frame_duration = 500;
uint8_t current_sleep_frame = 0;
-uint8_t current_wake_frame = 0; // uncomment if WAKE_FRAMES >1
+uint8_t current_wake_frame = 0; // uncomment if WAKE_FRAMES >1
uint8_t current_kaki_frame = 0;
-#ifdef SWAP_HANDS_ENABLE
-uint8_t current_rtogi_frame = 0;
-#endif
+# ifdef SWAP_HANDS_ENABLE
+uint8_t current_rtogi_frame = 0;
+# endif
// uint8_t current_ltogi_frame = 0;
// clang-format off
void render_small_kitty(void) {
diff --git a/users/drashna/audio_config.h b/users/drashna/audio_config.h
new file mode 100644
index 0000000000..21fe27ee6b
--- /dev/null
+++ b/users/drashna/audio_config.h
@@ -0,0 +1,33 @@
+// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define AUDIO_CLICKY
+#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
+
+#if __has_include("user_song_list.h")
+# include "user_song_list.h"
+#endif
+
+#ifdef USER_SONG_LIST
+# define STARTUP_SONG SONG(RICK_ROLL)
+# define GOODBYE_SONG SONG(SONIC_RING)
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
+# define UNICODE_SONG_MAC SONG(MARIO_THEME)
+# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
+# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
+# define UNICODE_SONG_BSD SONG(RICK_ROLL)
+# define UNICODE_SONG_WINC SONG(RICK_ROLL)
+#else
+# define STARTUP_SONG SONG(STARTUP_SOUND)
+# define GOODBYE_SONG SONG(GOODBYE_SOUND)
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
+# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
+# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
+# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
+# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
+# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
+#endif
diff --git a/users/drashna/callbacks.c b/users/drashna/callbacks.c
index c2f1156cee..568f56c8d1 100644
--- a/users/drashna/callbacks.c
+++ b/users/drashna/callbacks.c
@@ -3,9 +3,8 @@
#include "drashna.h"
-
#ifdef I2C_SCANNER_ENABLE
-void matrix_scan_i2c(void);
+void housekeeping_task_i2c_scanner(void);
void keyboard_post_init_i2c(void);
#endif
@@ -21,6 +20,64 @@ void keyboard_pre_init_user(void) {
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
+#ifdef CUSTOM_QUANTUM_PAINTER_ENABLE
+void keyboard_post_init_qp(void);
+#endif
+
+#ifdef OS_DETECTION_ENABLE
+os_variant_t os_type;
+
+uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) {
+ /* do something */
+
+ if (is_keyboard_master()) {
+ os_type = detected_host_os();
+ if (os_type) {
+ bool is_mac = (os_type == OS_MACOS) || (os_type == OS_IOS);
+ keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = is_mac;
+# ifdef UNICODE_COMMON_ENABLE
+ uint8_t mode = is_mac ? UNICODE_MODE_MACOS : UNICODE_MODE_WINCOMPOSE;
+ if (mode != get_unicode_input_mode()) {
+ set_unicode_input_mode(mode);
+ }
+# endif
+ switch (os_type) {
+ case OS_UNSURE:
+ xprintf("unknown OS Detected\n");
+ break;
+ case OS_LINUX:
+ xprintf("Linux Detected\n");
+ break;
+ case OS_WINDOWS:
+ xprintf("Windows Detected\n");
+ break;
+# if 0
+ case OS_WINDOWS_UNSURE:
+ xprintf("Windows? Detected\n");
+ break;
+# endif
+ case OS_MACOS:
+ xprintf("MacOS Detected\n");
+ break;
+ case OS_IOS:
+ xprintf("iOS Detected\n");
+ break;
+# if 0
+ case OS_PS5:
+ xprintf("PlayStation 5 Detected\n");
+ break;
+ case OS_HANDHELD:
+ xprintf("Nintend Switch/Quest 2 Detected\n");
+ break;
+# endif
+ }
+ }
+ }
+
+ return os_type ? 0 : 500;
+}
+#endif
+
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
void keyboard_post_init_user(void) {
#if defined(CUSTOM_RGBLIGHT)
@@ -47,6 +104,10 @@ void keyboard_post_init_user(void) {
PORTB &= ~(1 << 0);
#endif
+#ifdef OS_DETECTION_ENABLE
+ defer_exec(100, startup_exec, NULL);
+#endif
+
keyboard_post_init_keymap();
}
@@ -102,25 +163,6 @@ void suspend_wakeup_init_user(void) {
// scan function
__attribute__((weak)) void matrix_scan_keymap(void) {}
void matrix_scan_user(void) {
- static bool has_ran_yet;
- if (!has_ran_yet) {
- has_ran_yet = true;
- startup_user();
- }
-
-#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
- run_diablo_macro_check();
-#endif // TAP_DANCE_ENABLE
-#if defined(CUSTOM_RGB_MATRIX)
- matrix_scan_rgb_matrix();
-#endif
-#ifdef I2C_SCANNER_ENABLE
- matrix_scan_i2c();
-#endif
-#ifdef CUSTOM_OLED_DRIVER
- matrix_scan_oled();
-#endif
-
matrix_scan_keymap();
}
@@ -134,10 +176,6 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state)
return state;
}
layer_state_t layer_state_set_user(layer_state_t state) {
- if (!is_keyboard_master()) {
- return state;
- }
-
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#if defined(CUSTOM_POINTING_DEVICE)
state = layer_state_set_pointing(state);
@@ -145,18 +183,33 @@ layer_state_t layer_state_set_user(layer_state_t state) {
#if defined(CUSTOM_RGBLIGHT)
state = layer_state_set_rgb_light(state);
#endif // CUSTOM_RGBLIGHT
-#if defined(AUDIO_ENABLE) && !defined(__arm__)
+#if defined(AUDIO_ENABLE)
static bool is_gamepad_on = false;
if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
- is_gamepad_on = layer_state_cmp(state, _GAMEPAD);
+ static bool is_click_on = false;
+ is_gamepad_on = layer_state_cmp(state, _GAMEPAD);
if (is_gamepad_on) {
+ is_click_on = is_clicky_on();
+ if (is_click_on) {
+ clicky_off();
+ }
PLAY_LOOP(doom_song);
} else {
+ if (is_click_on) {
+ clicky_on();
+ }
stop_all_notes();