Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add Loop, Nano and Work boards from Work Louder #12756

Merged
merged 16 commits into from
Jun 10, 2021
Prev Previous commit
Next Next commit
Add full RGB matrix and VIA suport
drashna committed May 30, 2021

Verified

This commit was signed with the committer’s verified signature.
folkertdev Folkert de Vries
commit 8e870765b0e59675c43f9a6678b3e1e8f092e2ff
66 changes: 66 additions & 0 deletions keyboards/work_louder/encoder_actions.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* Copyright 2020 Neil Brian Ramirez
* Copyright 2021 drashna jael're (@drashna)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "encoder_actions.h"

#if defined(VIA_ENABLE) && defined(ENCODERS_ENABLE)

# ifdef ENCODERS
static uint8_t encoder_state[ENCODERS] = {0};
static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY;
static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY;
# endif

void encoder_action_unregister(void) {
# ifdef ENCODERS
for (int index = 0; index < ENCODERS; ++index) {
if (encoder_state[index]) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
.pressed = false,
.time = (timer_read() | 1)
};
encoder_state[index] = 0;
action_exec(encoder_event);
}
}
# endif
}

void encoder_action_register(uint8_t index, bool clockwise) {
# ifdef ENCODERS
keyevent_t encoder_event = (keyevent_t) {
.key = clockwise ? encoder_cw[index] : encoder_ccw[index],
.pressed = true,
.time = (timer_read() | 1)
};
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
action_exec(encoder_event);
# endif
}

void matrix_scan_kb(void) {
encoder_action_unregister();
matrix_scan_user();
}

void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_action_register(index, clockwise);
// encoder_update_user(index, clockwise);
};

#endif
21 changes: 21 additions & 0 deletions keyboards/work_louder/encoder_actions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2020 Neil Brian Ramirez
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"

void encoder_action_unregister(void);

void encoder_action_register(uint8_t index, bool clockwise);
12 changes: 9 additions & 3 deletions keyboards/work_louder/loop/config.h
Original file line number Diff line number Diff line change
@@ -20,14 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define VENDOR_ID 0x574C
#define PRODUCT_ID 0x1DF8
#define DEVICE_VER 0x0001
#define MANUFACTURER Work Louder
#define PRODUCT loop

/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_ROWS 2
#define MATRIX_COLS 12

/*
@@ -87,6 +87,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define RGB_DI_PIN F1
#define DRIVER_LED_TOTAL 9
#define RGB_MATRIX_DISABLE_KEYCODES

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@@ -151,3 +152,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define ENCODERS_PAD_A { D0, D2, D5 }
#define ENCODERS_PAD_B { D1, D3, D4 }

#define ENCODERS 3

#define ENCODERS_CW_KEY { { 1, 0 }, { 1, 2 }, { 1, 4 } }
#define ENCODERS_CCW_KEY { { 1, 1 }, { 1, 3 }, { 1, 4 } }
36 changes: 36 additions & 0 deletions keyboards/work_louder/loop/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2021 Work Louder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[0] = LAYOUT_via(
KC_MUTE, KC_1, KC_BTN1, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, MO(1),
KC_VOLD, KC_VOLD, KC_PGDN, KC_PGUP, KC_DOWN, KC_UP
),
[1] = LAYOUT_via(
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_via(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_via(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
)
};
2 changes: 2 additions & 0 deletions keyboards/work_louder/loop/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
10 changes: 0 additions & 10 deletions keyboards/work_louder/loop/loop.c
Original file line number Diff line number Diff line change
@@ -40,16 +40,6 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
}
#endif

#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_EANBLE)
# undef RGB_DI_PIN
# define RGBLIGHT_DI_PIN
# include "ws2812.c"

void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
#endif

#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
10 changes: 10 additions & 0 deletions keyboards/work_louder/loop/loop.h
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
#pragma once

#include "quantum.h"
#include "encoder_actions.h"
#include "rgb_functions.h"

/* This is a shortcut to help you visually see your layout.
*
@@ -31,3 +33,11 @@
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b } \
}

#define LAYOUT_via( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k00_a, k00_b, k01_a, k01_b, k02_a, k02_b \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k00_a, k00_b, k01_a, k01_b, k02_a, k02_b } \
}
22 changes: 22 additions & 0 deletions keyboards/work_louder/loop/post_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Copyright 2021 Drashna Jael're
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#ifndef TAP_CODE_DELAY
# define TAP_CODE_DELAY 10
#endif
2 changes: 2 additions & 0 deletions keyboards/work_louder/loop/rules.mk
Original file line number Diff line number Diff line change
@@ -23,3 +23,5 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812

SRC += encoder_actions.c rgb_functions.c
16 changes: 13 additions & 3 deletions keyboards/work_louder/nano/config.h
Original file line number Diff line number Diff line change
@@ -20,15 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define VENDOR_ID 0x574C
#define PRODUCT_ID 0xE6EF
#define DEVICE_VER 0x0001
#define MANUFACTURER Work Louder
#define PRODUCT nano

/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 3
#ifdef VIA_ENABLE
# define MATRIX_COLS 5
#else
# define MATRIX_COLS 3
#endif

/*
* Keyboard Matrix Assignments
@@ -87,6 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define RGB_DI_PIN F6
#define DRIVER_LED_TOTAL 2
#define RGB_MATRIX_DISABLE_KEYCODES

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@@ -152,3 +157,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define ENCODERS_PAD_A { D7 }
#define ENCODERS_PAD_B { B4 }

#define ENCODERS 1

#define ENCODERS_CW_KEY { { 0, 3 } }
#define ENCODERS_CCW_KEY { { 0, 4 } }
38 changes: 38 additions & 0 deletions keyboards/work_louder/nano/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Copyright 2021 Drashna Jael're
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H



const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[0] = LAYOUT_via(
KC_A, KC_1, MO(1),
KC_VOLD, KC_VOLU
),
[1] = LAYOUT_via(
RESET, _______, _______,
_______, _______
),
[2] = LAYOUT_via(
RESET, _______, _______,
_______, _______
),
[3] = LAYOUT_via(
RESET, _______, _______,
_______, _______
)
};
2 changes: 2 additions & 0 deletions keyboards/work_louder/nano/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
11 changes: 0 additions & 11 deletions keyboards/work_louder/nano/nano.c
Original file line number Diff line number Diff line change
@@ -26,17 +26,6 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
}
#endif


#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_EANBLE)
# undef RGB_DI_PIN
# define RGBLIGHT_DI_PIN
# include "ws2812.c"

void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
#endif

#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
9 changes: 9 additions & 0 deletions keyboards/work_louder/nano/nano.h
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
#pragma once

#include "quantum.h"
#include "encoder_actions.h"
#include "rgb_functions.h"

/* This is a shortcut to help you visually see your layout.
*
@@ -31,3 +33,10 @@
) { \
{ k00, k01, k02 } \
}

#define LAYOUT_via( \
k00, k01, k02, \
k00_a, k00_b \
) { \
{ k00, k01, k02, k00_a, k00_b } \
}
22 changes: 22 additions & 0 deletions keyboards/work_louder/nano/post_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Copyright 2021 Drashna Jael're
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#ifndef TAP_CODE_DELAY
# define TAP_CODE_DELAY 10
#endif
2 changes: 2 additions & 0 deletions keyboards/work_louder/nano/rules.mk
Original file line number Diff line number Diff line change
@@ -23,3 +23,5 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812

SRC += encoder_actions.c rgb_functions.c
69 changes: 69 additions & 0 deletions keyboards/work_louder/rgb_functions.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* Copyright 2021 Drashna Jael're
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H
#include "rgb_functions.h"

#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_EANBLE)
# undef RGB_DI_PIN
# define RGBLIGHT_DI_PIN
# include "ws2812.c"

void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
#endif

#ifdef RGB_MATRIX_ENABLE
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) { return false; }

if (record->event.pressed) {
switch(keycode) {
case RGB_MATRIX_TOGGLE: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case RGB_MATRIX_MODE_INC:
rgb_matrix_step();
return false;
case RGB_MATRIX_MODE_DEC:
rgb_matrix_step_reverse();
return false;
case RGB_MATRIX_HUE_INC:
rgb_matrix_increase_hue();
return false;
case RGB_MATRIX_HUE_DEC:
rgb_matrix_decrease_hue();
return false;
case RGB_MATRIX_SAT_INC:
rgb_matrix_increase_sat();
return false;
case RGB_MATRIX_SAT_DEC:
rgb_matrix_decrease_sat();
return false;
case RGB_MATRIX_VAL_INC:
rgb_matrix_increase_val();
return false;
case RGB_MATRIX_VAL_DEC:
rgb_matrix_decrease_val();
return false;
default:
break;
}
}
return true;
}
#endif
75 changes: 75 additions & 0 deletions keyboards/work_louder/rgb_functions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Copyright 2020 Neil Brian Ramirez
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"

#ifndef VIA_ENABLE
# ifndef RGB_MATRIX_TOGGLE
# define RGB_MATRIX_TOGGLE KC_F15
# endif
# ifndef RGB_MATRIX_MODE_INC
# define RGB_MATRIX_MODE_INC KC_F16
# endif
# ifndef RGB_MATRIX_MODE_DEC
# define RGB_MATRIX_MODE_DEC KC_F17
# endif
# ifndef RGB_MATRIX_HUE_INC
# define RGB_MATRIX_HUE_INC KC_F18
# endif
# ifndef RGB_MATRIX_HUE_DEC
# define RGB_MATRIX_HUE_DEC KC_F19
# endif
# ifndef RGB_MATRIX_SAT_INC
# define RGB_MATRIX_SAT_INC KC_F20
# endif
# ifndef RGB_MATRIX_SAT_DEC
# define RGB_MATRIX_SAT_DEC KC_F21
# endif
# ifndef RGB_MATRIX_VAL_INC
# define RGB_MATRIX_VAL_INC KC_F22
# endif
# ifndef RGB_MATRIX_VAL_DEC
# define RGB_MATRIX_VAL_DEC KC_F23
# endif
#else
# ifndef RGB_MATRIX_TOGGLE
# define RGB_MATRIX_TOGGLE USER00
# endif
# ifndef RGB_MATRIX_MODE_INC
# define RGB_MATRIX_MODE_INC USER01
# endif
# ifndef RGB_MATRIX_MODE_DEC
# define RGB_MATRIX_MODE_DEC USER02
# endif
# ifndef RGB_MATRIX_HUE_INC
# define RGB_MATRIX_HUE_INC USER03
# endif
# ifndef RGB_MATRIX_HUE_DEC
# define RGB_MATRIX_HUE_DEC USER04
# endif
# ifndef RGB_MATRIX_SAT_INC
# define RGB_MATRIX_SAT_INC USER05
# endif
# ifndef RGB_MATRIX_SAT_DEC
# define RGB_MATRIX_SAT_DEC USER06
# endif
# ifndef RGB_MATRIX_VAL_INC
# define RGB_MATRIX_VAL_INC USER07
# endif
# ifndef RGB_MATRIX_VAL_DEC
# define RGB_MATRIX_VAL_DEC USER08
# endif
#endif
10 changes: 8 additions & 2 deletions keyboards/work_louder/work_board/config.h
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define VENDOR_ID 0x574C
#define PRODUCT_ID 0xDCD0
#define DEVICE_VER 0x0001
#define MANUFACTURER Work Louder
#define PRODUCT Work Board
@@ -87,6 +87,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D0
#define DRIVER_LED_TOTAL 50
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100
#define RGB_MATRIX_DISABLE_KEYCODES

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@@ -148,6 +149,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_A { B0 }
#define ENCODERS_PAD_B { B1 }

#define ENCODERS 1

#define ENCODERS_CW_KEY { { 1, 12 } }
#define ENCODERS_CCW_KEY { { 2, 12 } }

/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0
111 changes: 111 additions & 0 deletions keyboards/work_louder/work_board/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

enum planck_layers {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST
};

enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
};

#define LOWER KC_FN13
#define RAISE KC_FN23

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_via(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MUTE,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_VOLD,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_VOLU,
KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),

/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_via(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, _______,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_via(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),


/* Adjust (Lower + Raise)
* v------------------------RGB CONTROL--------------------v
* ,-----------------------------------------------------------------------------------.
* | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_via(
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______,
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______,
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)

};
2 changes: 2 additions & 0 deletions keyboards/work_louder/work_board/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
2 changes: 2 additions & 0 deletions keyboards/work_louder/work_board/rules.mk
Original file line number Diff line number Diff line change
@@ -24,3 +24,5 @@ ENCODER_ENABLE = yes

RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812

SRC += encoder_actions.c rgb_functions.c
10 changes: 0 additions & 10 deletions keyboards/work_louder/work_board/work_board.c
Original file line number Diff line number Diff line change
@@ -70,16 +70,6 @@ __attribute__((weak)) void oled_task_user(void) {
#endif


#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_EANBLE)
# undef RGB_DI_PIN
# define RGBLIGHT_DI_PIN
# include "ws2812.c"

void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
#endif

#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
{ 49, 48, 47, 46, 45, 43, 42, 41, 40, 39, 38, 37},
28 changes: 28 additions & 0 deletions keyboards/work_louder/work_board/work_board.h
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
#pragma once

#include "quantum.h"
#include "encoder_actions.h"
#include "rgb_functions.h"

#define ___ KC_NO

@@ -53,3 +55,29 @@
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___ }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___ } \
}

#define LAYOUT_2u_space_via( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k0c_a, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k0c_b, \
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k0c_a }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k0c_b }, \
{ k30, k31, k32, k33, k34, k35, ___, k37, k38, k39, k3a, k3b, ___ } \
}

#define LAYOUT_via( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k0c_a, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k0c_b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
{ \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k0c_a }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k0c_b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___ } \
}