From c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 29 Dec 2021 20:17:34 -0800 Subject: [Keymap] Reorganization, cleanup and readmes for drashna code (#15617) --- .../work_board/keymaps/drashna/config.h | 5 +++ .../work_board/keymaps/drashna/keymap.c | 37 ++-------------------- .../work_board/keymaps/drashna/rules.mk | 4 +++ 3 files changed, 12 insertions(+), 34 deletions(-) (limited to 'keyboards/work_louder/work_board') diff --git a/keyboards/work_louder/work_board/keymaps/drashna/config.h b/keyboards/work_louder/work_board/keymaps/drashna/config.h index 5ea4dc7e48..b3bcaca25d 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/config.h +++ b/keyboards/work_louder/work_board/keymaps/drashna/config.h @@ -15,3 +15,8 @@ */ #pragma once + +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12 + +#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 diff --git a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c index 3bbb81bf04..3b0f4921ac 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c @@ -126,45 +126,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif -void rgb_matrix_indicators_user(void) {} - -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); #define THUMB_LED 6 #define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) - if (!userspace_config.rgb_layer_change) { - switch (get_highest_layer(layer_state | default_layer_state)) { - case _GAMEPAD: - rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DIABLO: - rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _RAISE: - rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _LOWER: - rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _ADJUST: - rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DEFAULT_LAYER_1: - rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DEFAULT_LAYER_2: - rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DEFAULT_LAYER_3: - rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DEFAULT_LAYER_4: - rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - } - } extern bool host_driver_disabled; if (host_driver_disabled) { @@ -214,4 +181,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(4, 0xFF, 0xFF, 0x00); RGB_MATRIX_INDICATOR_SET_COLOR(5, 0xFF, 0xFF, 0x00); } + + return true; } diff --git a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk index 363f2d0edb..6cccd5f8d2 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk @@ -1,6 +1,10 @@ BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes TAP_DANCE_ENABLE = no NKRO_ENABLE = yes RGBLIGHT_STARTUP_ANIMATION = yes ENCODER_MAP_ENABLE = yes + +AUTOCORRECTION_ENABLE = no +CUSTOM_UNICODE_ENABLE = no -- cgit v1.2.3