From aa33d8ba8e9ca78b7738eadd5401348c51d3d9d9 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Tue, 12 Mar 2024 16:31:51 -0600 Subject: [PATCH] Fixup work_board (#23266) * initial * Update keyboards/work_louder/work_board/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre --------- Co-authored-by: Drashna Jaelre --- keyboards/work_louder/work_board/config.h | 16 ----------- keyboards/work_louder/work_board/info.json | 12 ++++++++ .../work_board/keymaps/default/keymap.c | 11 ++------ .../work_board/keymaps/default/readme.md | 1 - .../work_board/keymaps/default/rules.mk | 1 + .../work_board/keymaps/via/config.h | 2 ++ .../work_board/keymaps/via/keymap.c | 28 ++++++++++--------- keyboards/work_louder/work_board/rules.mk | 17 ----------- 8 files changed, 32 insertions(+), 56 deletions(-) delete mode 100644 keyboards/work_louder/work_board/keymaps/default/readme.md diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 57f309513b..2514a63dde 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -24,20 +24,4 @@ along with this program. If not, see . #define RGB_MATRIX_LED_COUNT 49 #define RGB_MATRIX_DISABLE_KEYCODES -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index 8714133ae7..dc412fdabd 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -8,6 +8,18 @@ "pid": "0xDCD1", "max_power": 100 }, + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "nkro": true, + "rgblight": true, + "rgb_matrix": true, + "encoder": true + }, + "build": { + "lto": true + }, "rgb_matrix": { "animations": { "alphas_mods": true, diff --git a/keyboards/work_louder/work_board/keymaps/default/keymap.c b/keyboards/work_louder/work_board/keymaps/default/keymap.c index 56c4a2ce1d..e55cd5c598 100644 --- a/keyboards/work_louder/work_board/keymaps/default/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/default/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H -enum planck_layers { +enum layers { _QWERTY, _LOWER, _RAISE, @@ -27,15 +27,12 @@ enum tap_dances { ENC_TAP, }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, - MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + MO(3), KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, KC_SPC, TL_UPPR, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), [_LOWER] = LAYOUT( @@ -85,7 +82,3 @@ void dance_enc_reset(tap_dance_state_t *state, void *user_data) { tap_dance_action_t tap_dance_actions[] = { [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), }; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} diff --git a/keyboards/work_louder/work_board/keymaps/default/readme.md b/keyboards/work_louder/work_board/keymaps/default/readme.md deleted file mode 100644 index 3b2d89b9a6..0000000000 --- a/keyboards/work_louder/work_board/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for work diff --git a/keyboards/work_louder/work_board/keymaps/default/rules.mk b/keyboards/work_louder/work_board/keymaps/default/rules.mk index e5ddcae8d9..ec22b308f7 100644 --- a/keyboards/work_louder/work_board/keymaps/default/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/default/rules.mk @@ -1 +1,2 @@ TAP_DANCE_ENABLE = yes +TRI_LAYER_ENABLE = yes diff --git a/keyboards/work_louder/work_board/keymaps/via/config.h b/keyboards/work_louder/work_board/keymaps/via/config.h index d383467be7..7aa3bebe9b 100644 --- a/keyboards/work_louder/work_board/keymaps/via/config.h +++ b/keyboards/work_louder/work_board/keymaps/via/config.h @@ -2,3 +2,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define NO_ACTION_ONESHOT +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c index e920c2f9bd..7f0627eb67 100644 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c @@ -16,14 +16,16 @@ #include QMK_KEYBOARD_H -enum planck_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; - -enum tap_dances { - ENC_TAP, +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST }; -#define LOWER TL_LOWR -#define RAISE TL_UPPR +enum tap_dances { + ENC_TAP +}; // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -31,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, QK_KB_9, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + MO(3), KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [_LOWER] = LAYOUT( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, _______, @@ -158,9 +160,9 @@ void wl_config_set_value(uint8_t *data) { work_louder_config.led_level = (bool)*value_data; layer_state_set_kb(layer_state); break; - // case id_wl_layer: - // layer_move(*value_data); - // break; + // case id_wl_layer: + // layer_move(*value_data); + // break; } } @@ -173,9 +175,9 @@ void wl_config_get_value(uint8_t *data) { case id_wl_brightness: *value_data = work_louder_config.led_level; break; - // case id_wl_layer: - // *value_data = get_highest_layer(layer_state); - // break; + // case id_wl_layer: + // *value_data = get_highest_layer(layer_state); + // break; } } diff --git a/keyboards/work_louder/work_board/rules.mk b/keyboards/work_louder/work_board/rules.mk index 9f4b9a4bc5..a4c45393c0 100644 --- a/keyboards/work_louder/work_board/rules.mk +++ b/keyboards/work_louder/work_board/rules.mk @@ -1,20 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes -LTO_ENABLE = yes - -RGB_MATRIX_ENABLE = yes - SRC += rgb_functions.c DEFAULT_FOLDER = work_louder/work_board/rev3