summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-11-17 12:54:12 -0800
committerGitHub <noreply@github.com>2021-11-17 20:54:12 +0000
commit10e896630ce9283b42b8cdbf44ccb81538dc9851 (patch)
treecc6d582c8ed05f2e12eae47233daab0b96081077 /keyboards
parent254e26554b27aafc1d9676cec63263ede738bf57 (diff)
[Keyboard] Move encoder hacks into via keymaps for Work Louder boards (#15192)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/work_louder/loop/keymaps/via/keymap.c8
-rw-r--r--keyboards/work_louder/loop/keymaps/via/rules.mk2
-rw-r--r--keyboards/work_louder/loop/loop.h8
-rw-r--r--keyboards/work_louder/loop/rules.mk4
-rw-r--r--keyboards/work_louder/nano/keymaps/via/keymap.c7
-rw-r--r--keyboards/work_louder/nano/keymaps/via/rules.mk2
-rw-r--r--keyboards/work_louder/nano/nano.h7
-rw-r--r--keyboards/work_louder/nano/rules.mk4
-rw-r--r--keyboards/work_louder/work_board/keymaps/via/keymap.c13
-rw-r--r--keyboards/work_louder/work_board/keymaps/via/rules.mk2
-rw-r--r--keyboards/work_louder/work_board/rules.mk2
-rw-r--r--keyboards/work_louder/work_board/work_board.h26
12 files changed, 41 insertions, 44 deletions
diff --git a/keyboards/work_louder/loop/keymaps/via/keymap.c b/keyboards/work_louder/loop/keymaps/via/keymap.c
index c5769b9910..22113e836e 100644
--- a/keyboards/work_louder/loop/keymaps/via/keymap.c
+++ b/keyboards/work_louder/loop/keymaps/via/keymap.c
@@ -15,6 +15,14 @@
*/
#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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_via(
diff --git a/keyboards/work_louder/loop/keymaps/via/rules.mk b/keyboards/work_louder/loop/keymaps/via/rules.mk
index 36b7ba9cbc..6098ef3ad8 100644
--- a/keyboards/work_louder/loop/keymaps/via/rules.mk
+++ b/keyboards/work_louder/loop/keymaps/via/rules.mk
@@ -1,2 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+
+SRC += encoder_actions.c
diff --git a/keyboards/work_louder/loop/loop.h b/keyboards/work_louder/loop/loop.h
index acad9d7b3c..cfc58146d1 100644
--- a/keyboards/work_louder/loop/loop.h
+++ b/keyboards/work_louder/loop/loop.h
@@ -33,11 +33,3 @@
) { \
{ 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 } \
-}
diff --git a/keyboards/work_louder/loop/rules.mk b/keyboards/work_louder/loop/rules.mk
index 7e3f75e176..135291a7e2 100644
--- a/keyboards/work_louder/loop/rules.mk
+++ b/keyboards/work_louder/loop/rules.mk
@@ -20,7 +20,9 @@ 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
RGB_MATRIX_DRIVER = WS2812
-SRC += encoder_actions.c rgb_functions.c
+SRC += rgb_functions.c
diff --git a/keyboards/work_louder/nano/keymaps/via/keymap.c b/keyboards/work_louder/nano/keymaps/via/keymap.c
index 84a54a4aac..7461172e07 100644
--- a/keyboards/work_louder/nano/keymaps/via/keymap.c
+++ b/keyboards/work_louder/nano/keymaps/via/keymap.c
@@ -16,6 +16,13 @@
#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] = {
/* Base */
diff --git a/keyboards/work_louder/nano/keymaps/via/rules.mk b/keyboards/work_louder/nano/keymaps/via/rules.mk
index 36b7ba9cbc..6098ef3ad8 100644
--- a/keyboards/work_louder/nano/keymaps/via/rules.mk
+++ b/keyboards/work_louder/nano/keymaps/via/rules.mk
@@ -1,2 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+
+SRC += encoder_actions.c
diff --git a/keyboards/work_louder/nano/nano.h b/keyboards/work_louder/nano/nano.h
index 6f7463e6a4..6230d75ab7 100644
--- a/keyboards/work_louder/nano/nano.h
+++ b/keyboards/work_louder/nano/nano.h
@@ -33,10 +33,3 @@
) { \
{ k00, k01, k02 } \
}
-
-#define LAYOUT_via( \
- k00, k01, k02, \
- k00_a, k00_b \
-) { \
- { k00, k01, k02, k00_a, k00_b } \
-}
diff --git a/keyboards/work_louder/nano/rules.mk b/keyboards/work_louder/nano/rules.mk
index 843d80fe6a..a97f070422 100644
--- a/keyboards/work_louder/nano/rules.mk
+++ b/keyboards/work_louder/nano/rules.mk
@@ -20,7 +20,9 @@ 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
RGB_MATRIX_DRIVER = WS2812
-SRC += encoder_actions.c rgb_functions.c
+SRC += rgb_functions.c
diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c
index 70027697b4..5675adf2ed 100644
--- a/keyboards/work_louder/work_board/keymaps/via/keymap.c
+++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c
@@ -30,6 +30,19 @@ enum tap_dances {
#define LOWER FN_MO13
#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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_via(
diff --git a/keyboards/work_louder/work_board/keymaps/via/rules.mk b/keyboards/work_louder/work_board/keymaps/via/rules.mk
index 791d5ab502..7964f4279c 100644
--- a/keyboards/work_louder/work_board/keymaps/via/rules.mk
+++ b/keyboards/work_louder/work_board/keymaps/via/rules.mk
@@ -1,2 +1,4 @@
VIA_ENABLE = yes
TAP_DANCE_ENABLE = yes
+
+SRC += encoder_actions.c
diff --git a/keyboards/work_louder/work_board/rules.mk b/keyboards/work_louder/work_board/rules.mk
index 7ecf7db5dd..a97f070422 100644
--- a/keyboards/work_louder/work_board/rules.mk
+++ b/keyboards/work_louder/work_board/rules.mk
@@ -25,4 +25,4 @@ LTO_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
-SRC += encoder_actions.c rgb_functions.c
+SRC += rgb_functions.c
diff --git a/keyboards/work_louder/work_board/work_board.h b/keyboards/work_louder/work_board/work_board.h
index 25a881a19c..f1bc74b704 100644
--- a/keyboards/work_louder/work_board/work_board.h
+++ b/keyboards/work_louder/work_board/work_board.h
@@ -55,29 +55,3 @@
{ 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, ___ } \
-}