diff options
Diffstat (limited to 'keyboards')
10 files changed, 98 insertions, 63 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++) { |