mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-12 19:44:43 +00:00
[Keyboard] Move encoder hacks into via keymaps for Work Louder boards (#15192)
This commit is contained in:
parent
254e26554b
commit
10e896630c
12 changed files with 41 additions and 44 deletions
|
@ -15,6 +15,14 @@
|
||||||
*/
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#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 } \
|
||||||
|
}
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_via(
|
[0] = LAYOUT_via(
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
LTO_ENABLE = yes
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += encoder_actions.c
|
||||||
|
|
|
@ -33,11 +33,3 @@
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b } \
|
{ 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 } \
|
|
||||||
}
|
|
||||||
|
|
|
@ -20,7 +20,9 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
RGB_MATRIX_DRIVER = WS2812
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
|
|
||||||
SRC += encoder_actions.c rgb_functions.c
|
SRC += rgb_functions.c
|
||||||
|
|
|
@ -16,6 +16,13 @@
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT_via( \
|
||||||
|
k00, k01, k02, \
|
||||||
|
k00_a, k00_b \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k00_a, k00_b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Base */
|
/* Base */
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
LTO_ENABLE = yes
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += encoder_actions.c
|
||||||
|
|
|
@ -33,10 +33,3 @@
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02 } \
|
{ k00, k01, k02 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_via( \
|
|
||||||
k00, k01, k02, \
|
|
||||||
k00_a, k00_b \
|
|
||||||
) { \
|
|
||||||
{ k00, k01, k02, k00_a, k00_b } \
|
|
||||||
}
|
|
||||||
|
|
|
@ -20,7 +20,9 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
RGB_MATRIX_DRIVER = WS2812
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
|
|
||||||
SRC += encoder_actions.c rgb_functions.c
|
SRC += rgb_functions.c
|
||||||
|
|
|
@ -30,6 +30,19 @@ enum tap_dances {
|
||||||
#define LOWER FN_MO13
|
#define LOWER FN_MO13
|
||||||
#define RAISE FN_MO23
|
#define RAISE FN_MO23
|
||||||
|
|
||||||
|
#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, ___ } \
|
||||||
|
}
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_QWERTY] = LAYOUT_via(
|
[_QWERTY] = LAYOUT_via(
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += encoder_actions.c
|
||||||
|
|
|
@ -25,4 +25,4 @@ LTO_ENABLE = yes
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
RGB_MATRIX_DRIVER = WS2812
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
|
|
||||||
SRC += encoder_actions.c rgb_functions.c
|
SRC += rgb_functions.c
|
||||||
|
|
|
@ -55,29 +55,3 @@
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___ }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___ }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___ } \
|
{ 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, ___ } \
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue