aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-24 00:37:19 -0700
committerGitHub <noreply@github.com>2021-07-24 00:37:19 -0700
commitb8a1e14f53489eea63bd747d1b94d7d9b7da5ac9 (patch)
tree962a82138ba7db677d9ee90e4de44053bdddb017
parent73d4d7dc2bcad7ed7e4d3bdb33aacc18c374c8a9 (diff)
downloadqmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.tar.gz
qmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.zip
Remove deprecated callbacks for encoders and dip switches (#13404)
-rw-r--r--docs/ja/feature_encoders.md10
-rw-r--r--keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c25
-rw-r--r--keyboards/handwired/daishi/daishi.h2
-rw-r--r--keyboards/handwired/daishi/keymaps/default/keymap.c4
-rw-r--r--keyboards/hub20/keymaps/left_hand_numpad/keymap.c11
-rw-r--r--keyboards/hub20/keymaps/right_hand_numpad/keymap.c14
-rw-r--r--keyboards/manyboard/macro/keymaps/default/keymap.c84
-rw-r--r--keyboards/manyboard/macro/keymaps/via/keymap.c85
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c18
-rw-r--r--keyboards/pearlboards/pandora/keymaps/default/keymap.c3
-rw-r--r--keyboards/pearlboards/pandora/keymaps/via/keymap.c3
-rw-r--r--keyboards/planck/keymaps/abishalom/keymap.c2
-rw-r--r--keyboards/planck/keymaps/atreus/keymap.c2
-rw-r--r--keyboards/planck/keymaps/charlesrocket/keymap.c2
-rw-r--r--keyboards/planck/keymaps/dear_vehicle_owner/keymap.c2
-rw-r--r--keyboards/planck/keymaps/default/keymap.c2
-rw-r--r--keyboards/planck/keymaps/eshesh2/keymap.c2
-rw-r--r--keyboards/planck/keymaps/fabian/keymap.c4
-rw-r--r--keyboards/planck/keymaps/gitdrik/keymap.c2
-rw-r--r--keyboards/planck/keymaps/grant24/keymap.c2
-rw-r--r--keyboards/planck/keymaps/hvp/keymap.c2
-rw-r--r--keyboards/planck/keymaps/jdelkins/keymap.c3
-rw-r--r--keyboards/planck/keymaps/jetpacktuxedo/keymap.c5
-rw-r--r--keyboards/planck/keymaps/lja83/keymap.c2
-rw-r--r--keyboards/planck/keymaps/mgalisa/keymap.c4
-rw-r--r--keyboards/planck/keymaps/mikethetiger/keymap.c5
-rw-r--r--keyboards/planck/keymaps/msiu/keymap.c5
-rw-r--r--keyboards/planck/keymaps/muzfuz/keymap.c7
-rw-r--r--keyboards/planck/keymaps/navi/keymap.c2
-rw-r--r--keyboards/planck/keymaps/nick/keymap.c2
-rw-r--r--keyboards/planck/keymaps/oryx/keymap.c2
-rw-r--r--keyboards/planck/keymaps/pascamel/keymap.c5
-rw-r--r--keyboards/planck/keymaps/pevecyan/keymap.c7
-rw-r--r--keyboards/planck/keymaps/ptillemans/keymap.c5
-rw-r--r--keyboards/planck/keymaps/raffle/keymap.c5
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/keymap.c2
-rw-r--r--keyboards/planck/keymaps/sigul/keymap.c2
-rw-r--r--keyboards/planck/keymaps/skug/keymap.c5
-rw-r--r--keyboards/planck/keymaps/smittey/keymap.c5
-rw-r--r--keyboards/planck/keymaps/synth_sample/keymap.c2
-rw-r--r--keyboards/planck/keymaps/synth_wavetable/keymap.c2
-rw-r--r--keyboards/planck/keymaps/tom/keymap.c5
-rw-r--r--keyboards/planck/keymaps/tylerwince/keymap.c2
-rw-r--r--keyboards/planck/keymaps/unagi/keymap.c5
-rwxr-xr-xkeyboards/planck/keymaps/winternebs/keymap.c11
-rw-r--r--keyboards/planck/planck.h2
-rw-r--r--keyboards/planck/rev6/rev6.c27
-rw-r--r--keyboards/preonic/keymaps/cranium/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/fsck/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/mikethetiger/keymap.c3
-rw-r--r--keyboards/preonic/keymaps/muzfuz/keymap.c5
-rw-r--r--keyboards/preonic/keymaps/xulkal/keymap.c3
-rw-r--r--keyboards/preonic/rev3/rev3.c17
-rw-r--r--keyboards/sofle/keymaps/helltm/keymap.c329
-rw-r--r--keyboards/work_louder/loop/keymaps/default/keymap.c9
-rw-r--r--keyboards/work_louder/nano/keymaps/default/keymap.c15
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c3
-rw-r--r--layouts/community/ortho_4x12/juno/keymap.c3
-rw-r--r--layouts/community/ortho_4x12/junonum/keymap.c3
59 files changed, 343 insertions, 463 deletions
diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md
index 7b7f394c8..21f42d38b 100644
--- a/docs/ja/feature_encoders.md
+++ b/docs/ja/feature_encoders.md
@@ -51,15 +51,18 @@ ENCODER_ENABLE = yes
51コールバック関数を `<keyboard>.c` に記述することができます: 51コールバック関数を `<keyboard>.c` に記述することができます:
52 52
53```c 53```c
54void encoder_update_kb(uint8_t index, bool clockwise) { 54bool encoder_update_kb(uint8_t index, bool clockwise) {
55 encoder_update_user(index, clockwise); 55 if (!encoder_update_user(index, clockwise)) {
56 return false;
57 }
58
56} 59}
57``` 60```
58 61
59あるいは `keymap.c` に記述することもできます: 62あるいは `keymap.c` に記述することもできます:
60 63
61```c 64```c
62void encoder_update_user(uint8_t index, bool clockwise) { 65bool encoder_update_user(uint8_t index, bool clockwise) {
63 if (index == 0) { /* First encoder */ 66 if (index == 0) { /* First encoder */
64 if (clockwise) { 67 if (clockwise) {
65 tap_code(KC_PGDN); 68 tap_code(KC_PGDN);
@@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
73 tap_code(KC_UP); 76 tap_code(KC_UP);
74 } 77 }
75 } 78 }
79 return true;
76} 80}
77``` 81```
78 82
diff --git a/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c
index a17f79331..a32fef104 100644
--- a/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c
+++ b/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c
@@ -16,16 +16,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18 18
19// clang-format off
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 21
21// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) 22 // ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute)
22// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home 23 // ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home
23// Tab Q W E R T Y U I O P [ ] \ PgUp 24 // Tab Q W E R T Y U I O P [ ] \ PgUp
24// Caps A S D F G H J K L ; " Enter PgDn 25 // Caps A S D F G H J K L ; " Enter PgDn
25// Sh_L Z X C V B N M , . ? Sh_R Up End 26 // Sh_L Z X C V B N M , . ? Sh_R Up End
26// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right 27 // Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
27
28
29 [0] = LAYOUT( 28 [0] = LAYOUT(
30 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, 29 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE,
31 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, 30 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
@@ -61,14 +60,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
61 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 61 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
63 ), 62 ),
64
65}; 63};
64// clang-format on
66 65
67 66bool encoder_update_user(uint8_t index, bool clockwise) {
68void encoder_update_user(uint8_t index, bool clockwise) {
69 if (clockwise) { 67 if (clockwise) {
70 tap_code(KC_VOLU); 68 tap_code(KC_VOLU);
71 } else { 69 } else {
72 tap_code(KC_VOLD); 70 tap_code(KC_VOLD);
73 } 71 }
72 return true;
74} 73}
diff --git a/keyboards/handwired/daishi/daishi.h b/keyboards/handwired/daishi/daishi.h
index 49e377589..0d0c57ab2 100644
--- a/keyboards/handwired/daishi/daishi.h
+++ b/keyboards/handwired/daishi/daishi.h
@@ -2,8 +2,6 @@
2 2
3#include "quantum.h" 3#include "quantum.h"
4 4
5#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
6
7// The first section contains all of the arguments 5// The first section contains all of the arguments
8// The second converts the arguments into a two-dimensional array 6// The second converts the arguments into a two-dimensional array
9#define LAYOUT( \ 7#define LAYOUT( \
diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c
index 5214e8b6f..a1ef825ff 100644
--- a/keyboards/handwired/daishi/keymaps/default/keymap.c
+++ b/keyboards/handwired/daishi/keymaps/default/keymap.c
@@ -82,8 +82,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
82 return true; 82 return true;
83}; 83};
84 84
85bool encoder_update(bool clockwise) { 85bool encoder_update_user(uint8_t index, bool clockwise) {
86 if (clockwise) { 86 if (clockwise) {
87 tap_code(KC_VOLU); 87 tap_code(KC_VOLU);
88 } else { 88 } else {
89 tap_code(KC_VOLD); 89 tap_code(KC_VOLD);
diff --git a/keyboards/hub20/keymaps/left_hand_numpad/keymap.c b/keyboards/hub20/keymaps/left_hand_numpad/keymap.c
index 395ebc15b..b5817ab3c 100644
--- a/keyboards/hub20/keymaps/left_hand_numpad/keymap.c
+++ b/keyboards/hub20/keymaps/left_hand_numpad/keymap.c
@@ -15,15 +15,13 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18
19
20// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS TRUE 18// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS TRUE
21// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER TRUE 19// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER TRUE
22// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO TRUE 20// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO TRUE
23 21
22#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold
24 23
25#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold 24// clang-format off
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 [0] = LAYOUT_left_handed( 26 [0] = LAYOUT_left_handed(
29 KC_MUTE, KC_MPLY, 27 KC_MUTE, KC_MPLY,
@@ -42,8 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
42 _______, _______ 40 _______, _______
43) 41)
44}; 42};
43// clang-format of
45 44
46void encoder_update_user(uint8_t index, bool clockwise) { 45bool encoder_update_user(uint8_t index, bool clockwise) {
47 if (index == 0) { /* Left Encoder */ 46 if (index == 0) { /* Left Encoder */
48 if (clockwise) { 47 if (clockwise) {
49 tap_code(KC_VOLU); 48 tap_code(KC_VOLU);
@@ -57,5 +56,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
57 tap_code(KC_MPRV); 56 tap_code(KC_MPRV);
58 } 57 }
59 } 58 }
59 return true;
60} 60}
61
diff --git a/keyboards/hub20/keymaps/right_hand_numpad/keymap.c b/keyboards/hub20/keymaps/right_hand_numpad/keymap.c
index 89466d31b..ad3e5f49a 100644
--- a/keyboards/hub20/keymaps/right_hand_numpad/keymap.c
+++ b/keyboards/hub20/keymaps/right_hand_numpad/keymap.c
@@ -15,15 +15,13 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18
19
20// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS TRUE 18// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS TRUE
21// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER TRUE 19// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER TRUE
22// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO TRUE 20// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO TRUE
23 21
22#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold
24 23
25#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold 24// clang-format off
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 26
29//NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER 27//NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER
@@ -44,11 +42,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 _______, _______, _______ 42 _______, _______, _______
45) 43)
46}; 44};
45// clang-format on
47 46
48 47bool encoder_update_user(uint8_t index, bool clockwise) {
49
50
51void encoder_update_user(uint8_t index, bool clockwise) {
52 if (index == 0) { /* Left Encoder */ 48 if (index == 0) { /* Left Encoder */
53 if (clockwise) { 49 if (clockwise) {
54 tap_code(KC_VOLU); 50 tap_code(KC_VOLU);
@@ -62,5 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
62 tap_code(KC_MPRV); 58 tap_code(KC_MPRV);
63 } 59 }
64 } 60 }
61 return true;
65} 62}
66
diff --git a/keyboards/manyboard/macro/keymaps/default/keymap.c b/keyboards/manyboard/macro/keymaps/default/keymap.c
index 4feda5080..0b9d2ac92 100644
--- a/keyboards/manyboard/macro/keymaps/default/keymap.c
+++ b/keyboards/manyboard/macro/keymaps/default/keymap.c
@@ -15,59 +15,61 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18 18// clang-format off
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ortho_4x4( 20 [0] = LAYOUT_ortho_4x4(
21 KC_F1, KC_F2, KC_F3, KC_F4, 21 KC_F1, KC_F2, KC_F3, KC_F4,
22 KC_F5, KC_F6, KC_F7, KC_F8, 22 KC_F5, KC_F6, KC_F7, KC_F8,
23 KC_F9, KC_F10, KC_F11, KC_F12, 23 KC_F9, KC_F10, KC_F11, KC_F12,
24 KC_F13, KC_F14, KC_F15, TO(1) 24 KC_F13, KC_F14, KC_F15, TO(1)
25 ), 25 ),
26 [1] = LAYOUT_ortho_4x4( 26 [1] = LAYOUT_ortho_4x4(
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, TO(2) 30 KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
31 ), 31 ),
32 [2] = LAYOUT_ortho_4x4( 32 [2] = LAYOUT_ortho_4x4(
33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, TO(0) 36 KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
37 ), 37 ),
38}; 38};
39// clang-format on
39 40
40layer_state_t layer_state_set_user(layer_state_t state) { 41layer_state_t layer_state_set_user(layer_state_t state) {
41 switch (get_highest_layer(state)) { 42 switch (get_highest_layer(state)) {
42 case 0: 43 case 0:
43 sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); 44 sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
44 rgblight_set(); 45 rgblight_set();
45 break; 46 break;
46 case 1: 47 case 1:
47 sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); 48 sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
48 rgblight_set(); 49 rgblight_set();
49 break; 50 break;
50 case 2: 51 case 2:
51 sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); 52 sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
52 rgblight_set(); 53 rgblight_set();
53 break; 54 break;
54 } 55 }
55 return state; 56 return state;
56} 57}
57 58
58void encoder_update_user(uint8_t index, bool clockwise) { 59bool encoder_update_user(uint8_t index, bool clockwise) {
59 /* With an if statement we can check which encoder was turned. */ 60 /* With an if statement we can check which encoder was turned. */
60 if (index == 0) { /* First encoder */ 61 if (index == 0) { /* First encoder */
61 /* And with another if statement we can check the direction. */ 62 /* And with another if statement we can check the direction. */
62 if (clockwise) { 63 if (clockwise) {
63 /* This is where the actual magic happens: this bit of code taps on the 64 /* This is where the actual magic happens: this bit of code taps on the
64 Page Down key. You can do anything QMK allows you to do here. 65 Page Down key. You can do anything QMK allows you to do here.
65 You'll want to replace these lines with the things you want your 66 You'll want to replace these lines with the things you want your
66 encoders to do. */ 67 encoders to do. */
67 tap_code(KC_AUDIO_VOL_UP); 68 tap_code(KC_AUDIO_VOL_UP);
68 } else { 69 } else {
69 /* And likewise for the other direction, this time Vol Down is pressed. */ 70 /* And likewise for the other direction, this time Vol Down is pressed. */
70 tap_code(KC_AUDIO_VOL_DOWN); 71 tap_code(KC_AUDIO_VOL_DOWN);
72 }
71 } 73 }
72 } 74 return true;
73} 75}
diff --git a/keyboards/manyboard/macro/keymaps/via/keymap.c b/keyboards/manyboard/macro/keymaps/via/keymap.c
index ce32d6d24..0b9d2ac92 100644
--- a/keyboards/manyboard/macro/keymaps/via/keymap.c
+++ b/keyboards/manyboard/macro/keymaps/via/keymap.c
@@ -15,58 +15,61 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18 18// clang-format off
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ortho_4x4( 20 [0] = LAYOUT_ortho_4x4(
21 KC_F1, KC_F2, KC_F3, KC_F4, 21 KC_F1, KC_F2, KC_F3, KC_F4,
22 KC_F5, KC_F6, KC_F7, KC_F8, 22 KC_F5, KC_F6, KC_F7, KC_F8,
23 KC_F9, KC_F10, KC_F11, KC_F12, 23 KC_F9, KC_F10, KC_F11, KC_F12,
24 KC_F13, KC_F14, KC_F15, TO(1) 24 KC_F13, KC_F14, KC_F15, TO(1)
25 ), 25 ),
26 [1] = LAYOUT_ortho_4x4( 26 [1] = LAYOUT_ortho_4x4(
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, TO(2) 30 KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
31 ), 31 ),
32 [2] = LAYOUT_ortho_4x4( 32 [2] = LAYOUT_ortho_4x4(
33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, TO(0) 36 KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
37 ), 37 ),
38}; 38};
39// clang-format on
40
39layer_state_t layer_state_set_user(layer_state_t state) { 41layer_state_t layer_state_set_user(layer_state_t state) {
40 switch (get_highest_layer(state)) { 42 switch (get_highest_layer(state)) {
41 case 0: 43 case 0:
42 sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); 44 sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
43 rgblight_set(); 45 rgblight_set();
44 break; 46 break;
45 case 1: 47 case 1:
46 sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); 48 sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
47 rgblight_set(); 49 rgblight_set();
48 break; 50 break;
49 case 2: 51 case 2:
50 sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); 52 sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
51 rgblight_set(); 53 rgblight_set();
52 break; 54 break;
53 } 55 }
54 return state; 56 return state;
55} 57}
56 58
57void encoder_update_user(uint8_t index, bool clockwise) { 59bool encoder_update_user(uint8_t index, bool clockwise) {
58 /* With an if statement we can check which encoder was turned. */ 60 /* With an if statement we can check which encoder was turned. */
59 if (index == 0) { /* First encoder */ 61 if (index == 0) { /* First encoder */
60 /* And with another if statement we can check the direction. */ 62 /* And with another if statement we can check the direction. */
61 if (clockwise) { 63 if (clockwise) {
62 /* This is where the actual magic happens: this bit of code taps on the 64 /* This is where the actual magic happens: this bit of code taps on the
63 Page Down key. You can do anything QMK allows you to do here. 65 Page Down key. You can do anything QMK allows you to do here.
64 You'll want to replace these lines with the things you want your 66 You'll want to replace these lines with the things you want your
65 encoders to do. */ 67 encoders to do. */
66 tap_code(KC_AUDIO_VOL_UP); 68 tap_code(KC_AUDIO_VOL_UP);
67 } else { 69 } else {
68 /* And likewise for the other direction, this time Vol Down is pressed. */ 70 /* And likewise for the other direction, this time Vol Down is pressed. */
69 tap_code(KC_AUDIO_VOL_DOWN); 71 tap_code(KC_AUDIO_VOL_DOWN);
72 }
70 } 73 }
71 } 74 return true;
72} 75}
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
index b276a042b..b3da17395 100644
--- a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
@@ -19,15 +19,13 @@
19# include "oled_display.h" 19# include "oled_display.h"
20#endif 20#endif
21 21
22enum layer_names { 22enum layer_names { _MA, _FN };
23 _MA,
24 _FN
25};
26 23
27enum custom_keycodes { 24enum custom_keycodes {
28 KC_CUST = SAFE_RANGE, 25 KC_CUST = SAFE_RANGE,
29}; 26};
30 27
28// clang-format off
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 [_MA] = LAYOUT_ansi( 30 [_MA] = LAYOUT_ansi(
33 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, 31 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
@@ -44,6 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
45 ), 43 ),
46}; 44};
45// clang-format on
47 46
48#ifdef OLED_DRIVER_ENABLE 47#ifdef OLED_DRIVER_ENABLE
49oled_rotation_t oled_init_user(oled_rotation_t rotation) { 48oled_rotation_t oled_init_user(oled_rotation_t rotation) {
@@ -53,7 +52,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
53} 52}
54 53
55void oled_task_user(void) { 54void oled_task_user(void) {
56 if (timer_elapsed(oled_timer) >= 3000) { 55 if (timer_elapsed(oled_timer) >= 3000) {
57 set_oled_mode(OLED_MODE_IDLE); 56 set_oled_mode(OLED_MODE_IDLE);
58 } 57 }
59 render_frame(); 58 render_frame();
@@ -64,23 +63,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
64 // Send keystrokes to host keyboard, if connected (see readme) 63 // Send keystrokes to host keyboard, if connected (see readme)
65 process_record_remote_kb(keycode, record); 64 process_record_remote_kb(keycode, record);
66 65
67 switch(keycode) { 66 switch (keycode) {
68 case RGB_TOG: 67 case RGB_TOG:
69 if (record->event.pressed) { 68 if (record->event.pressed) {
70#ifdef OLED_DRIVER_ENABLE 69#ifdef OLED_DRIVER_ENABLE
71 process_record_keymap_oled(keycode); 70 process_record_keymap_oled(keycode);
72#endif 71#endif
73 } 72 }
74 break; 73 break;
75 case KC_CUST: //custom macro 74 case KC_CUST: // custom macro
76 if (record->event.pressed) { 75 if (record->event.pressed) {
77 } 76 }
78 break; 77 break;
79 } 78 }
80 return true; 79 return true;
81} 80}
82 81
83
84bool encoder_update_user(uint8_t index, bool clockwise) { 82bool encoder_update_user(uint8_t index, bool clockwise) {
85 if (clockwise) { 83 if (clockwise) {
86 tap_code(KC_VOLU); 84 tap_code(KC_VOLU);
diff --git a/keyboards/pearlboards/pandora/keymaps/default/keymap.c b/keyboards/pearlboards/pandora/keymaps/default/keymap.c
index 1fd9fcfb4..879ea04a1 100644
--- a/keyboards/pearlboards/pandora/keymaps/default/keymap.c
+++ b/keyboards/pearlboards/pandora/keymaps/default/keymap.c
@@ -71,7 +71,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
71 return true; 71 return true;
72} 72}
73// Encoder click function 73// Encoder click function
74void dip_switch_update_user(uint8_t index, bool active) { 74bool dip_switch_update_user(uint8_t index, bool active) {
75 switch (index) { 75 switch (index) {
76 /* First encoder */ 76 /* First encoder */
77 case 0: 77 case 0:
@@ -80,4 +80,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
80 } 80 }
81 break; 81 break;
82 } 82 }
83 return true;
83} 84}
diff --git a/keyboards/pearlboards/pandora/keymaps/via/keymap.c b/keyboards/pearlboards/pandora/keymaps/via/keymap.c
index 01f9ef8f4..96a8b5224 100644
--- a/keyboards/pearlboards/pandora/keymaps/via/keymap.c
+++ b/keyboards/pearlboards/pandora/keymaps/via/keymap.c
@@ -85,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
85 return true; 85 return true;
86} 86}
87// Encoder click function 87// Encoder click function
88void dip_switch_update_user(uint8_t index, bool active) { 88bool dip_switch_update_user(uint8_t index, bool active) {
89 switch (index) { 89 switch (index) {
90 /* First encoder */ 90 /* First encoder */
91 case 0: 91 case 0:
@@ -94,4 +94,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
94 } 94 }
95 break; 95 break;
96 } 96 }
97 return true
97} 98}
diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c
index e2ca81cc0..c88dced41 100644
--- a/keyboards/planck/keymaps/abishalom/keymap.c
+++ b/keyboards/planck/keymaps/abishalom/keymap.c
@@ -221,7 +221,7 @@ uint16_t muse_counter = 0;
221uint8_t muse_offset = 70; 221uint8_t muse_offset = 70;
222uint16_t muse_tempo = 50; 222uint16_t muse_tempo = 50;
223 223
224bool encoder_update(bool clockwise) { 224bool encoder_update_user(uint8_t index, bool clockwise) {
225 if (muse_mode) { 225 if (muse_mode) {
226 if (IS_LAYER_ON(_RAISE)) { 226 if (IS_LAYER_ON(_RAISE)) {
227 if (clockwise) { 227 if (clockwise) {
diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c
index ce3d254d4..f89b6fecd 100644
--- a/keyboards/planck/keymaps/atreus/keymap.c
+++ b/keyboards/planck/keymaps/atreus/keymap.c
@@ -144,7 +144,7 @@ uint16_t muse_counter = 0;
144uint8_t muse_offset = 70; 144uint8_t muse_offset = 70;
145uint16_t muse_tempo = 50; 145uint16_t muse_tempo = 50;
146 146
147bool encoder_update(bool clockwise) { 147bool encoder_update_user(uint8_t index, bool clockwise) {
148 if (muse_mode) { 148 if (muse_mode) {
149 if (IS_LAYER_ON(_RAISE)) { 149 if (IS_LAYER_ON(_RAISE)) {
150 if (clockwise) { 150 if (clockwise) {
diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c
index 9d60b0db9..cec3f0186 100644
--- a/keyboards/planck/keymaps/charlesrocket/keymap.c
+++ b/keyboards/planck/keymaps/charlesrocket/keymap.c
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
139uint8_t muse_offset = 70; 139uint8_t muse_offset = 70;
140uint16_t muse_tempo = 50; 140uint16_t muse_tempo = 50;
141 141
142bool encoder_update(bool clockwise) { 142bool encoder_update_user(uint8_t index, bool clockwise) {
143 if (muse_mode) { 143 if (muse_mode) {
144 if (IS_LAYER_ON(_RAISE)) { 144 if (IS_LAYER_ON(_RAISE)) {
145 if (clockwise) { 145 if (clockwise) {
diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
index d83df6d4b..c25df20a5 100644
--- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
+++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
@@ -263,7 +263,7 @@ uint16_t muse_counter = 0;
263uint8_t muse_offset = 70; 263uint8_t muse_offset = 70;
264uint16_t muse_tempo = 50; 264uint16_t muse_tempo = 50;
265 265
266bool encoder_update(bool clockwise) { 266bool encoder_update_user(uint8_t index, bool clockwise) {
267 if (muse_mode) { 267 if (muse_mode) {
268 if (IS_LAYER_ON(_RAISE)) { 268 if (IS_LAYER_ON(_RAISE)) {
269 if (clockwise) { 269 if (clockwise) {
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 644dae6b9..9a6e1189b 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
256uint8_t muse_offset = 70; 256uint8_t muse_offset = 70;
257uint16_t muse_tempo = 50; 257uint16_t muse_tempo = 50;
258 258
259bool encoder_update(bool clockwise) { 259bool encoder_update_user(uint8_t index, bool clockwise) {
260 if (muse_mode) { 260 if (muse_mode) {
261 if (IS_LAYER_ON(_RAISE)) { 261 if (IS_LAYER_ON(_RAISE)) {
262 if (clockwise) { 262 if (clockwise) {
diff --git a/keyboards/planck/keymaps/eshesh2/keymap.c b/keyboards/planck/keymaps/eshesh2/keymap.c
index 59768e15a..c13af1d3f 100644
--- a/keyboards/planck/keymaps/eshesh2/keymap.c
+++ b/keyboards/planck/keymaps/eshesh2/keymap.c
@@ -187,7 +187,7 @@ uint16_t muse_counter = 0;
187uint8_t muse_offset = 70; 187uint8_t muse_offset = 70;
188uint16_t muse_tempo = 50; 188uint16_t muse_tempo = 50;
189 189
190bool encoder_update(bool clockwise) { 190bool encoder_update_user(uint8_t index, bool clockwise) {
191 if (muse_mode) { 191 if (muse_mode) {
192 if (IS_LAYER_ON(_RAISE)) { 192 if (IS_LAYER_ON(_RAISE)) {
193 if (clockwise) { 193 if (clockwise) {
diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c
index 93f023362..9969d4337 100644
--- a/keyboards/planck/keymaps/fabian/keymap.c
+++ b/keyboards/planck/keymaps/fabian/keymap.c
@@ -265,7 +265,7 @@ uint16_t muse_counter = 0;
265uint8_t muse_offset = 70; 265uint8_t muse_offset = 70;
266uint16_t muse_tempo = 50; 266uint16_t muse_tempo = 50;
267 267
268bool encoder_update(bool clockwise) { 268bool encoder_update_user(uint8_t index, bool clockwise) {
269 if (muse_mode) { 269 if (muse_mode) {
270 if (IS_LAYER_ON(_RAISE)) { 270 if (IS_LAYER_ON(_RAISE)) {
271 if (clockwise) { 271 if (clockwise) {
@@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) {
291 } 291 }
292} 292}
293 293
294void dip_update(uint8_t index, bool active) { 294bool dip_switch_update_user(uint8_t index, bool active) {
295 switch (index) { 295 switch (index) {
296 case 0: 296 case 0:
297 if (active) { 297 if (active) {
diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c
index e3e03929a..58db07828 100644
--- a/keyboards/planck/keymaps/gitdrik/keymap.c
+++ b/keyboards/planck/keymaps/gitdrik/keymap.c
@@ -137,7 +137,7 @@ uint16_t muse_counter = 0;
137uint8_t muse_offset = 70; 137uint8_t muse_offset = 70;
138uint16_t muse_tempo = 50; 138uint16_t muse_tempo = 50;
139 139
140bool encoder_update(bool clockwise) { 140bool encoder_update_user(uint8_t index, bool clockwise) {
141 if (muse_mode) { 141 if (muse_mode) {
142 if (IS_LAYER_ON(_RIGHT)) { 142 if (IS_LAYER_ON(_RIGHT)) {
143 if (clockwise) { 143 if (clockwise) {
diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c
index 469cf08c7..a82403d19 100644
--- a/keyboards/planck/keymaps/grant24/keymap.c
+++ b/keyboards/planck/keymaps/grant24/keymap.c
@@ -279,7 +279,7 @@ uint16_t muse_counter = 0;
279uint8_t muse_offset = 70; 279uint8_t muse_offset = 70;
280uint16_t muse_tempo = 50; 280uint16_t muse_tempo = 50;
281 281
282bool encoder_update(bool clockwise) { 282bool encoder_update_user(uint8_t index, bool clockwise) {
283 if (muse_mode) { 283 if (muse_mode) {
284 if (IS_LAYER_ON(_RAISE)) { 284 if (IS_LAYER_ON(_RAISE)) {
285 if (clockwise) { 285 if (clockwise) {
diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c
index c8325b646..95d3646df 100644
--- a/keyboards/planck/keymaps/hvp/keymap.c
+++ b/keyboards/planck/keymaps/hvp/keymap.c
@@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
89uint8_t muse_offset = 70; 89uint8_t muse_offset = 70;
90uint16_t muse_tempo = 50; 90uint16_t muse_tempo = 50;
91 91
92bool encoder_update(bool clockwise) { 92bool encoder_update_user(uint8_t index, bool clockwise) {
93 if (muse_mode) { 93 if (muse_mode) {
94 if (IS_LAYER_ON(_RAISE)) { 94 if (IS_LAYER_ON(_RAISE)) {
95 if (clockwise) { 95 if (clockwise) {
diff --git a/keyboards/planck/keymaps/jdelkins/keymap.c b/keyboards/planck/keymaps/jdelkins/keymap.c
index 620c36129..249cd2783 100644
--- a/keyboards/planck/keymaps/jdelkins/keymap.c
+++ b/keyboards/planck/keymaps/jdelkins/keymap.c
@@ -259,7 +259,7 @@ uint16_t muse_counter = 0;
259uint8_t muse_offset = 70; 259uint8_t muse_offset = 70;
260uint16_t muse_tempo = 50; 260uint16_t muse_tempo = 50;
261 261
262void encoder_update(bool clockwise) { 262bool encoder_update_user(uint8_t index, bool clockwise) {
263 if (muse_mode) { 263 if (muse_mode) {
264 if (IS_LAYER_ON(_RAISE)) { 264 if (IS_LAYER_ON(_RAISE)) {
265 if (clockwise) { 265 if (clockwise) {
@@ -289,6 +289,7 @@ void encoder_update(bool clockwise) {
289 #endif 289 #endif
290 } 290 }
291 } 291 }
292 return true;
292} 293}
293 294
294bool dip_switch_update_user(uint8_t index, bool active) { 295bool dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
index 7c73d0952..2e7d8e876 100644
--- a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
+++ b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
@@ -190,7 +190,7 @@ uint16_t muse_tempo = 20;
190 190
191extern float clicky_rand; 191extern float clicky_rand;
192 192
193bool encoder_update(bool clockwise) { 193bool encoder_update_user(uint8_t index, bool clockwise) {
194 if (is_clicky_on()) { 194 if (is_clicky_on()) {
195 if (IS_LAYER_ON(_RAISE)) { 195 if (IS_LAYER_ON(_RAISE)) {
196 if (clockwise) { 196 if (clockwise) {
@@ -241,7 +241,7 @@ bool encoder_update(bool clockwise) {
241 return true; 241 return true;
242} 242}
243 243
244void dip_update(uint8_t index, bool active) { 244bool dip_switch_update_user(uint8_t index, bool active) {
245 switch (index) { 245 switch (index) {
246 case 0: 246 case 0:
247 if (active) { 247 if (active) {
@@ -273,6 +273,7 @@ void dip_update(uint8_t index, bool active) {
273 clicky_off(); 273 clicky_off();
274 } 274 }
275 } 275 }
276 return true;
276} 277}
277 278
278void matrix_scan_user(void) { 279void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/lja83/keymap.c b/keyboards/planck/keymaps/lja83/keymap.c
index 2b4b9adcc..82862a77e 100644
--- a/keyboards/planck/keymaps/lja83/keymap.c
+++ b/keyboards/planck/keymaps/lja83/keymap.c
@@ -266,7 +266,7 @@ uint16_t muse_counter = 0;
266uint8_t muse_offset = 70; 266uint8_t muse_offset = 70;
267uint16_t muse_tempo = 50; 267uint16_t muse_tempo = 50;
268 268
269bool encoder_update_user(uint16_t index, bool clockwise) { 269bool encoder_update_user(uint8_t index, bool clockwise) {
270 if (muse_mode) { 270 if (muse_mode) {
271 if (IS_LAYER_ON(_RAISE)) { 271 if (IS_LAYER_ON(_RAISE)) {
272 if (clockwise) { 272 if (clockwise) {
diff --git a/keyboards/planck/keymaps/mgalisa/keymap.c b/keyboards/planck/keymaps/mgalisa/keymap.c
index 73843b740..09e829564 100644
--- a/keyboards/planck/keymaps/mgalisa/keymap.c
+++ b/keyboards/planck/keymaps/mgalisa/keymap.c
@@ -317,7 +317,7 @@ uint16_t muse_counter = 0;
317uint8_t muse_offset = 70; 317uint8_t muse_offset = 70;
318uint16_t muse_tempo = 50; 318uint16_t muse_tempo = 50;
319 319
320bool encoder_update(bool clockwise) { 320bool encoder_update_user(uint8_t index, bool clockwise) {
321 if (muse_mode) { 321 if (muse_mode) {
322 if (IS_LAYER_ON(_RAISE)) { 322 if (IS_LAYER_ON(_RAISE)) {
323 if (clockwise) { 323 if (clockwise) {
@@ -350,7 +350,7 @@ bool encoder_update(bool clockwise) {
350 return true; 350 return true;
351} 351}
352 352
353void dip_update(uint8_t index, bool active) { 353bool dip_switch_update_user(uint8_t index, bool active) {
354 switch (index) { 354 switch (index) {
355 case 0: 355 case 0:
356 if (active) { 356 if (active) {
diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c
index 7da292d35..2fe932150 100644
--- a/keyboards/planck/keymaps/mikethetiger/keymap.c
+++ b/keyboards/planck/keymaps/mikethetiger/keymap.c
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
256uint8_t muse_offset = 70; 256uint8_t muse_offset = 70;
257uint16_t muse_tempo = 50; 257uint16_t muse_tempo = 50;
258 258
259bool encoder_update(bool clockwise) { 259bool encoder_update_user(uint8_t index, bool clockwise) {
260 if (muse_mode) { 260 if (muse_mode) {
261 if (IS_LAYER_ON(_RAISE)) { 261 if (IS_LAYER_ON(_RAISE)) {
262 if (clockwise) { 262 if (clockwise) {
@@ -293,7 +293,7 @@ bool encoder_update(bool clockwise) {
293 return true; 293 return true;
294} 294}
295 295
296void dip_update(uint8_t index, bool active) { 296bool dip_switch_update_user(uint8_t index, bool active) {
297 switch (index) { 297 switch (index) {
298 case 0: 298 case 0:
299 if (active) { 299 if (active) {
@@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) {
318 #endif 318 #endif
319 } 319 }
320 } 320 }
321 return true;
321} 322}
322 323
323void matrix_scan_user(void) { 324void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c
index fb58e0ee8..559767f1f 100644
--- a/keyboards/planck/keymaps/msiu/keymap.c
+++ b/keyboards/planck/keymaps/msiu/keymap.c
@@ -128,7 +128,7 @@ uint16_t muse_counter = 0;
128uint8_t muse_offset = 70; 128uint8_t muse_offset = 70;
129uint16_t muse_tempo = 50; 129uint16_t muse_tempo = 50;
130 130
131bool encoder_update(bool clockwise) { 131bool encoder_update_user(uint8_t index, bool clockwise) {
132 if (muse_mode) { 132 if (muse_mode) {
133 if (IS_LAYER_ON(_RAISE)) { 133 if (IS_LAYER_ON(_RAISE)) {
134 if (clockwise) { 134 if (clockwise) {
@@ -155,7 +155,7 @@ bool encoder_update(bool clockwise) {
155 return true; 155 return true;
156} 156}
157 157
158void dip_update(uint8_t index, bool active) { 158bool dip_switch_update_user(uint8_t index, bool active) {
159 switch (index) { 159 switch (index) {
160 case 0: 160 case 0:
161 if (active) { 161 if (active) {
@@ -180,6 +180,7 @@ void dip_update(uint8_t index, bool active) {
180 #endif 180 #endif
181 } 181 }
182 } 182 }
183 return true;
183} 184}
184 185
185void matrix_scan_user(void) { 186void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c
index cb8bd6268..5e21660d0 100644
--- a/keyboards/planck/keymaps/muzfuz/keymap.c
+++ b/keyboards/planck/keymaps/muzfuz/keymap.c
@@ -177,8 +177,7 @@ uint16_t muse_counter = 0;
177uint8_t muse_offset = 70; 177uint8_t muse_offset = 70;
178uint16_t muse_tempo = 50; 178uint16_t muse_tempo = 50;
179 179
180bool encoder_update(bool clockwise) 180bool encoder_update_user(uint8_t index, bool clockwise) {
181{
182 if (muse_mode) 181 if (muse_mode)
183 { 182 {
184 if (IS_LAYER_ON(_RAISE)) 183 if (IS_LAYER_ON(_RAISE))
@@ -230,8 +229,7 @@ bool encoder_update(bool clockwise)
230 return true; 229 return true;
231} 230}
232 231
233void dip_update(uint8_t index, bool active) 232bool encoder_update_user(uint8_t index, bool clockwise) {
234{
235 switch (index) 233 switch (index)
236 { 234 {
237 case 0: 235 case 0:
@@ -263,6 +261,7 @@ void dip_update(uint8_t index, bool active)
263#endif 261#endif
264 } 262 }
265 } 263 }
264 return true;
266} 265}
267 266
268void matrix_scan_user(void) 267void matrix_scan_user(void)
diff --git a/keyboards/planck/keymaps/navi/keymap.c b/keyboards/planck/keymaps/navi/keymap.c
index 0c0c7f246..8141607f6 100644
--- a/keyboards/planck/keymaps/navi/keymap.c
+++ b/keyboards/planck/keymaps/navi/keymap.c
@@ -170,7 +170,7 @@ uint16_t muse_counter = 0;
170uint8_t muse_offset = 70; 170uint8_t muse_offset = 70;
171uint16_t muse_tempo = 50; 171uint16_t muse_tempo = 50;
172 172
173bool encoder_update(bool clockwise) { 173bool encoder_update_user(uint8_t index, bool clockwise) {
174 if (muse_mode) { 174 if (muse_mode) {
175 if (IS_LAYER_ON(_RAISE)) { 175 if (IS_LAYER_ON(_RAISE)) {
176 if (clockwise) { 176 if (clockwise) {
diff --git a/keyboards/planck/keymaps/nick/keymap.c b/keyboards/planck/keymaps/nick/keymap.c
index 4fcba8079..d75a91edb 100644
--- a/keyboards/planck/keymaps/nick/keymap.c
+++ b/keyboards/planck/keymaps/nick/keymap.c
@@ -109,7 +109,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
109 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); 109 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
110} 110}
111 111
112bool encoder_update(bool clockwise) { 112bool encoder_update_user(uint8_t index, bool clockwise) {
113 if (clockwise && !IS_LAYER_ON(_RAISE)) { 113 if (clockwise && !IS_LAYER_ON(_RAISE)) {
114 tap_code(KC_MS_WH_DOWN); 114 tap_code(KC_MS_WH_DOWN);
115 } else if (!clockwise && !IS_LAYER_ON(_RAISE)) { 115 } else if (!clockwise && !IS_LAYER_ON(_RAISE)) {
diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c
index 8abe417d7..27387a81a 100644
--- a/keyboards/planck/keymaps/oryx/keymap.c
+++ b/keyboards/planck/keymaps/oryx/keymap.c
@@ -319,7 +319,7 @@ uint16_t muse_counter = 0;
319uint8_t muse_offset = 70; 319uint8_t muse_offset = 70;
320uint16_t muse_tempo = 50; 320uint16_t muse_tempo = 50;
321 321
322bool encoder_update(bool clockwise) { 322bool encoder_update_user(uint8_t index, bool clockwise) {
323 if (muse_mode) { 323 if (muse_mode) {
324 if (IS_LAYER_ON(_RAISE)) { 324 if (IS_LAYER_ON(_RAISE)) {
325 if (clockwise) { 325 if (clockwise) {
diff --git a/keyboards/planck/keymaps/pascamel/keymap.c b/keyboards/planck/keymaps/pascamel/keymap.c
index ed2d41fbe..13553dc39 100644
--- a/keyboards/planck/keymaps/pascamel/keymap.c
+++ b/keyboards/planck/keymaps/pascamel/keymap.c
@@ -157,7 +157,7 @@ uint16_t muse_counter = 0;
157uint8_t muse_offset = 70; 157uint8_t muse_offset = 70;
158uint16_t muse_tempo = 50; 158uint16_t muse_tempo = 50;
159 159
160bool encoder_update(bool clockwise) { 160bool encoder_update_user(uint8_t index, bool clockwise) {
161 if (muse_mode) { 161 if (muse_mode) {
162 if (IS_LAYER_ON(_RAISE)) { 162 if (IS_LAYER_ON(_RAISE)) {
163 if (clockwise) { 163 if (clockwise) {
@@ -184,7 +184,7 @@ bool encoder_update(bool clockwise) {
184 return true; 184 return true;
185} 185}
186 186
187void dip_update(uint8_t index, bool active) { 187bool dip_switch_update_user(uint8_t index, bool active) {
188 switch (index) { 188 switch (index) {
189 case 0: 189 case 0:
190 if (active) { 190 if (active) {
@@ -209,6 +209,7 @@ void dip_update(uint8_t index, bool active) {
209 #endif 209 #endif
210 } 210 }
211 } 211 }
212 return true;
212} 213}
213 214
214void matrix_scan_user(void) { 215void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/pevecyan/keymap.c b/keyboards/planck/keymaps/pevecyan/keymap.c
index 25643b244..553dd84a5 100644
--- a/keyboards/planck/keymaps/pevecyan/keymap.c
+++ b/keyboards/planck/keymaps/pevecyan/keymap.c
@@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
132 * | | | | | | | | | | | | 132 * | | | | | | | | | | | |
133 * `-----------------------------------------------------------------------------------' 133 * `-----------------------------------------------------------------------------------'
134 */ 134 */
135[_ALTGR] = LAYOUT_planck_grid(k 135[_ALTGR] = LAYOUT_planck_grid(
136 _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______, 136 _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______,
137 _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______, 137 _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______,
138 _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______, 138 _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______,
@@ -178,7 +178,7 @@ uint16_t muse_counter = 0;
178uint8_t muse_offset = 70; 178uint8_t muse_offset = 70;
179uint16_t muse_tempo = 50; 179uint16_t muse_tempo = 50;
180 180
181bool encoder_update(bool clockwise) { 181bool encoder_update_user(uint8_t index, bool clockwise) {
182 if (muse_mode) { 182 if (muse_mode) {
183 if (IS_LAYER_ON(_RAISE)) { 183 if (IS_LAYER_ON(_RAISE)) {
184 if (clockwise) { 184 if (clockwise) {
@@ -205,7 +205,7 @@ bool encoder_update(bool clockwise) {
205 return true; 205 return true;
206} 206}
207 207
208void dip_update(uint8_t index, bool active) { 208bool dip_switch_update_user(uint8_t index, bool active) {
209 switch (index) { 209 switch (index) {
210 case 0: 210 case 0:
211 if (active) { 211 if (active) {
@@ -230,6 +230,7 @@ void dip_update(uint8_t index, bool active) {
230 #endif 230 #endif
231 } 231 }
232 } 232 }
233 return true;
233} 234}
234 235
235void matrix_scan_user(void) { 236void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/ptillemans/keymap.c b/keyboards/planck/keymaps/ptillemans/keymap.c
index c163f7372..e671fd59c 100644
--- a/keyboards/planck/keymaps/ptillemans/keymap.c
+++ b/keyboards/planck/keymaps/ptillemans/keymap.c
@@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
232uint8_t muse_offset = 70; 232uint8_t muse_offset = 70;
233uint16_t muse_tempo = 50; 233uint16_t muse_tempo = 50;
234 234
235bool encoder_update(bool clockwise) { 235bool encoder_update_user(uint8_t index, bool clockwise) {
236 if (muse_mode) { 236 if (muse_mode) {
237 if (IS_LAYER_ON(_RAISE)) { 237 if (IS_LAYER_ON(_RAISE)) {
238 if (clockwise) { 238 if (clockwise) {
@@ -269,7 +269,7 @@ bool encoder_update(bool clockwise) {
269 return true; 269 return true;
270} 270}
271 271
272void dip_update(uint8_t index, bool active) { 272bool dip_switch_update_user(uint8_t index, bool active) {
273 switch (index) { 273 switch (index) {
274 case 0: 274 case 0:
275 if (active) { 275 if (active) {
@@ -294,6 +294,7 @@ void dip_update(uint8_t index, bool active) {
294 #endif 294 #endif
295 } 295 }
296 } 296 }
297 return true;
297} 298}
298 299
299void matrix_scan_user(void) { 300void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/raffle/keymap.c b/keyboards/planck/keymaps/raffle/keymap.c
index 26ed0edf5..52727f35b 100644
--- a/keyboards/planck/keymaps/raffle/keymap.c
+++ b/keyboards/planck/keymaps/raffle/keymap.c
@@ -223,7 +223,7 @@ uint16_t muse_counter = 0;
223uint8_t muse_offset = 70; 223uint8_t muse_offset = 70;
224uint16_t muse_tempo = 50; 224uint16_t muse_tempo = 50;
225 225
226bool encoder_update(bool clockwise) { 226bool encoder_update_user(uint8_t index, bool clockwise) {
227 if (muse_mode) { 227 if (muse_mode) {
228 if (IS_LAYER_ON(_RAISE)) { 228 if (IS_LAYER_ON(_RAISE)) {
229 if (clockwise) { 229 if (clockwise) {
@@ -250,7 +250,7 @@ bool encoder_update(bool clockwise) {
250 return true; 250 return true;
251} 251}
252 252
253void dip_update(uint8_t index, bool active) { 253bool dip_switch_update_user(uint8_t index, bool active) {
254 switch (index) { 254 switch (index) {
255 case 0: 255 case 0:
256 if (active) { 256 if (active) {
@@ -275,6 +275,7 @@ void dip_update(uint8_t index, bool active) {
275 #endif 275 #endif
276 } 276 }
277 } 277 }
278 return true;
278} 279}
279 280
280void matrix_scan_user(void) { 281void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c
index 9eb178823..08e9809e9 100644
--- a/keyboards/planck/keymaps/rjhilgefort/keymap.c
+++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c
@@ -154,7 +154,7 @@ uint16_t muse_counter = 0;
154uint8_t muse_offset = 70; 154uint8_t muse_offset = 70;
155uint16_t muse_tempo = 50; 155uint16_t muse_tempo = 50;
156 156
157bool encoder_update(bool clockwise) { 157bool encoder_update_user(uint8_t index, bool clockwise) {
158 if (muse_mode) { 158 if (muse_mode) {
159 if (IS_LAYER_ON(_RAISE)) { 159 if (IS_LAYER_ON(_RAISE)) {
160 if (clockwise) { 160 if (clockwise) {
diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c
index c22d272df..622e9f29c 100644
--- a/keyboards/planck/keymaps/sigul/keymap.c
+++ b/keyboards/planck/keymaps/sigul/keymap.c
@@ -162,7 +162,7 @@ uint16_t muse_counter = 0;
162uint8_t muse_offset = 70; 162uint8_t muse_offset = 70;
163uint16_t muse_tempo = 50; 163uint16_t muse_tempo = 50;
164 164
165bool encoder_update(bool clockwise) { 165bool encoder_update_user(uint8_t index, bool clockwise) {
166 if (muse_mode) { 166 if (muse_mode) {
167 if (IS_LAYER_ON(_RAISE)) { 167 if (IS_LAYER_ON(_RAISE)) {
168 if (clockwise) { 168 if (clockwise) {
diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c
index 6b34f4980..6367d3c34 100644
--- a/keyboards/planck/keymaps/skug/keymap.c
+++ b/keyboards/planck/keymaps/skug/keymap.c
@@ -264,7 +264,7 @@ uint16_t muse_counter = 0;
264uint8_t muse_offset = 70; 264uint8_t muse_offset = 70;
265uint16_t muse_tempo = 50; 265uint16_t muse_tempo = 50;
266 266
267bool encoder_update(bool clockwise) { 267bool encoder_update_user(uint8_t index, bool clockwise) {
268 if (muse_mode) { 268 if (muse_mode) {
269 if (IS_LAYER_ON(_RAISE)) { 269 if (IS_LAYER_ON(_RAISE)) {
270 if (clockwise) { 270 if (clockwise) {
@@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) {
291 return true; 291 return true;
292} 292}
293 293
294void dip_update(uint8_t index, bool active) { 294bool dip_switch_update_user(uint8_t index, bool active) {
295 switch (index) { 295 switch (index) {
296 case 0: 296 case 0:
297 if (active) { 297 if (active) {
@@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) {
316 #endif 316 #endif
317 } 317 }
318 } 318 }
319 return true;
319} 320}
320 321
321void matrix_scan_user(void) { 322void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/smittey/keymap.c b/keyboards/planck/keymaps/smittey/keymap.c
index 7eca6b76d..537b60c10 100644
--- a/keyboards/planck/keymaps/smittey/keymap.c
+++ b/keyboards/planck/keymaps/smittey/keymap.c
@@ -297,7 +297,7 @@ uint16_t muse_counter = 0;
297uint8_t muse_offset = 70; 297uint8_t muse_offset = 70;
298uint16_t muse_tempo = 50; 298uint16_t muse_tempo = 50;
299 299
300bool encoder_update(bool clockwise) { 300bool encoder_update_user(uint8_t index, bool clockwise) {
301 if (muse_mode) { 301 if (muse_mode) {
302 if (IS_LAYER_ON(_RAISE)) { 302 if (IS_LAYER_ON(_RAISE)) {
303 if (clockwise) { 303 if (clockwise) {
@@ -322,7 +322,7 @@ bool encoder_update(bool clockwise) {
322 return true; 322 return true;
323} 323}
324 324
325void dip_update(uint8_t index, bool active) { 325bool dip_switch_update_user(uint8_t index, bool active) {
326 switch (index) { 326 switch (index) {
327 case 0: 327 case 0:
328 if (active) { 328 if (active) {
@@ -347,6 +347,7 @@ void dip_update(uint8_t index, bool active) {
347 #endif 347 #endif
348 } 348 }
349 } 349 }
350 return true;
350} 351}
351 352
352void matrix_scan_user(void) { 353void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/synth_sample/keymap.c b/keyboards/planck/keymaps/synth_sample/keymap.c
index 8c6b6fe87..0a57b7ce9 100644
--- a/keyboards/planck/keymaps/synth_sample/keymap.c
+++ b/keyboards/planck/keymaps/synth_sample/keymap.c
@@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
247 return true; 247 return true;
248} 248}
249 249
250bool encoder_update(bool clockwise) { 250bool encoder_update_user(uint8_t index, bool clockwise) {
251 if (clockwise) { 251 if (clockwise) {
252 #ifdef MOUSEKEY_ENABLE 252 #ifdef MOUSEKEY_ENABLE
253 register_code(KC_MS_WH_DOWN); 253 register_code(KC_MS_WH_DOWN);
diff --git a/keyboards/planck/keymaps/synth_wavetable/keymap.c b/keyboards/planck/keymaps/synth_wavetable/keymap.c
index 9a2ad0a8b..d413d6389 100644
--- a/keyboards/planck/keymaps/synth_wavetable/keymap.c
+++ b/keyboards/planck/keymaps/synth_wavetable/keymap.c
@@ -308,7 +308,7 @@ uint16_t dac_value_generate(void) {
308 return value; 308 return value;
309} 309}
310 310
311bool encoder_update(bool clockwise) { 311bool encoder_update_user(uint8_t index, bool clockwise) {
312 if (clockwise) { 312 if (clockwise) {
313 dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH; 313 dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH;
314 } else { 314 } else {
diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c
index d2f54cdb1..66beaf33b 100644
--- a/keyboards/planck/keymaps/tom/keymap.c
+++ b/keyboards/planck/keymaps/tom/keymap.c
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
139uint8_t muse_offset = 70; 139uint8_t muse_offset = 70;
140uint16_t muse_tempo = 50; 140uint16_t muse_tempo = 50;
141 141
142bool encoder_update(bool clockwise) { 142bool encoder_update_user(uint8_t index, bool clockwise) {
143 if (muse_mode) { 143 if (muse_mode) {
144 if (IS_LAYER_ON(_RAISE)) { 144 if (IS_LAYER_ON(_RAISE)) {
145 if (clockwise) { 145 if (clockwise) {
@@ -172,7 +172,7 @@ bool encoder_update(bool clockwise) {
172 return true; 172 return true;
173} 173}
174 174
175void dip_update(uint8_t index, bool active) { 175bool dip_switch_update_user(uint8_t index, bool active) {
176 switch (index) { 176 switch (index) {
177 case 0: 177 case 0:
178 if (active) { 178 if (active) {
@@ -197,6 +197,7 @@ void dip_update(uint8_t index, bool active) {
197 #endif 197 #endif
198 } 198 }
199 } 199 }
200 return true;
200} 201}
201 202
202void matrix_scan_user(void) { 203void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c
index 2c9d56a41..5cbc47b2f 100644
--- a/keyboards/planck/keymaps/tylerwince/keymap.c
+++ b/keyboards/planck/keymaps/tylerwince/keymap.c
@@ -215,7 +215,7 @@ uint16_t muse_counter = 0;
215uint8_t muse_offset = 70; 215uint8_t muse_offset = 70;
216uint16_t muse_tempo = 50; 216uint16_t muse_tempo = 50;
217 217
218bool encoder_update(bool clockwise) { 218bool encoder_update_user(uint8_t index, bool clockwise) {
219 if (muse_mode) { 219 if (muse_mode) {
220 if (IS_LAYER_ON(_RAISE)) { 220 if (IS_LAYER_ON(_RAISE)) {
221 if (clockwise) { 221 if (clockwise) {
diff --git a/keyboards/planck/keymaps/unagi/keymap.c b/keyboards/planck/keymaps/unagi/keymap.c
index 520f42852..1fc181479 100644
--- a/keyboards/planck/keymaps/unagi/keymap.c
+++ b/keyboards/planck/keymaps/unagi/keymap.c
@@ -267,7 +267,7 @@ uint16_t muse_counter = 0;
267uint8_t muse_offset = 70; 267uint8_t muse_offset = 70;
268uint16_t muse_tempo = 50; 268uint16_t muse_tempo = 50;
269 269
270bool encoder_update(bool clockwise) { 270bool encoder_update_user(uint8_t index, bool clockwise) {
271 if (muse_mode) { 271 if (muse_mode) {
272 if (IS_LAYER_ON(_RAISE)) { 272 if (IS_LAYER_ON(_RAISE)) {
273 if (clockwise) { 273 if (clockwise) {
@@ -294,7 +294,7 @@ bool encoder_update(bool clockwise) {
294 return true; 294 return true;
295} 295}
296 296
297void dip_update(uint8_t index, bool active) { 297bool dip_switch_update_user(uint8_t index, bool active) {
298 switch (index) { 298 switch (index) {
299 case 0: 299 case 0:
300 if (active) { 300 if (active) {
@@ -319,6 +319,7 @@ void dip_update(uint8_t index, bool active) {
319 #endif 319 #endif
320 } 320 }
321 } 321 }
322 return true;
322} 323}
323 324
324void matrix_scan_user(void) { 325void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/winternebs/keymap.c b/keyboards/planck/keymaps/winternebs/keymap.c
index 259603faf..4bb97b27a 100755
--- a/keyboards/planck/keymaps/winternebs/keymap.c
+++ b/keyboards/planck/keymaps/winternebs/keymap.c
@@ -64,10 +64,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
64 * `-----------------------------------------------------------------------------------' 64 * `-----------------------------------------------------------------------------------'
65 */ 65 */
66[_WORKMAN] = LAYOUT_planck_grid( 66[_WORKMAN] = LAYOUT_planck_grid(
67 KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, 67 KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC,
68 KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, 68 KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,
69 KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , 69 KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
70 KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT 70 KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT
71), 71),
72 72
73/* Lower 73/* Lower
@@ -149,7 +149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
149 return true; 149 return true;
150} 150}
151 151
152void dip_update(uint8_t index, bool active) { 152bool dip_switch_update_user(uint8_t index, bool active) {
153 switch (index) { 153 switch (index) {
154 case 0: 154 case 0:
155 if (active) { 155 if (active) {
@@ -159,4 +159,5 @@ void dip_update(uint8_t index, bool active) {
159 } 159 }
160 break; 160 break;
161 } 161 }
162 return true;
162} 163}
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h
index ef037f369..31e3ec915 100644
--- a/keyboards/planck/planck.h
+++ b/keyboards/planck/planck.h
@@ -3,8 +3,6 @@
3 3
4#include "quantum.h" 4#include "quantum.h"
5 5
6#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
7
8#if defined(KEYBOARD_planck_ez) 6#if defined(KEYBOARD_planck_ez)
9 #include "ez.h" 7 #include "ez.h"
10#elif defined(KEYBOARD_planck_light) 8#elif defined(KEYBOARD_planck_light)
diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c
index e6c49ae1c..da6da1100 100644
--- a/keyboards/planck/rev6/rev6.c
+++ b/keyboards/planck/rev6/rev6.c
@@ -40,31 +40,4 @@ led_config_t g_led_config = { {
40// 0 40// 0
41// 7 8 1 2 41// 7 8 1 2
42 42
43void suspend_power_down_kb(void) {
44 rgb_matrix_set_suspend_state(true);
45 suspend_power_down_user();
46}
47
48void suspend_wakeup_init_kb(void) {
49 rgb_matrix_set_suspend_state(false);
50 suspend_wakeup_init_user();
51}
52#endif
53
54void matrix_init_kb(void) {
55 matrix_init_user();
56}
57
58void matrix_scan_kb(void) {
59 matrix_scan_user();
60}
61
62#ifdef DIP_SWITCH_ENABLE
63__attribute__((weak))
64bool dip_update(uint8_t index, bool active) { return true; }
65
66__attribute__((weak))
67bool dip_switch_update_user(uint8_t index, bool active) {
68 return dip_update(index, active);
69}
70#endif 43#endif
diff --git a/keyboards/preonic/keymaps/cranium/keymap.c b/keyboards/preonic/keymaps/cranium/keymap.c
index 63897d1e6..2c1337d84 100644
--- a/keyboards/preonic/keymaps/cranium/keymap.c
+++ b/keyboards/preonic/keymaps/cranium/keymap.c
@@ -175,7 +175,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
175 return true; 175 return true;
176} 176}
177 177
178void dip_update(uint8_t index, bool active) { 178bool dip_switch_update_user(uint8_t index, bool active) {
179 switch (index) { 179 switch (index) {
180 case 0: 180 case 0:
181 if (active) { 181 if (active) {
@@ -191,6 +191,7 @@ void dip_update(uint8_t index, bool active) {
191 muse_mode = false; 191 muse_mode = false;
192 } 192 }
193 } 193 }
194 return true;
194} 195}
195 196
196void matrix_scan_user(void) { 197void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c
index 8e2747f44..dea152360 100644
--- a/keyboards/preonic/keymaps/fsck/keymap.c
+++ b/keyboards/preonic/keymaps/fsck/keymap.c
@@ -202,7 +202,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
202 return true; 202 return true;
203} 203}
204 204
205void dip_update(uint8_t index, bool active) { 205bool dip_switch_update_user(uint8_t index, bool active) {
206 switch (index) { 206 switch (index) {
207 case 0: 207 case 0:
208 if (active) { 208 if (active) {
@@ -221,6 +221,7 @@ void dip_update(uint8_t index, bool active) {
221 #endif 221 #endif
222 } 222 }
223 } 223 }
224 return true;
224} 225}
225 226
226void matrix_scan_user(void) { 227void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/mikethetiger/keymap.c b/keyboards/preonic/keymaps/mikethetiger/keymap.c
index e4b1f2e82..36e09e550 100644
--- a/keyboards/preonic/keymaps/mikethetiger/keymap.c
+++ b/keyboards/preonic/keymaps/mikethetiger/keymap.c
@@ -242,7 +242,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
242 return true; 242 return true;
243} 243}
244 244
245void dip_update(uint8_t index, bool active) { 245bool dip_switch_update_user(uint8_t index, bool active) {
246 switch (index) { 246 switch (index) {
247 case 0: 247 case 0:
248 if (active) { 248 if (active) {
@@ -261,6 +261,7 @@ void dip_update(uint8_t index, bool active) {
261 #endif 261 #endif
262 } 262 }
263 } 263 }
264 return true;
264} 265}
265 266
266void matrix_scan_user(void) { 267void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/muzfuz/keymap.c b/keyboards/preonic/keymaps/muzfuz/keymap.c
index a72894677..c0c7ae07e 100644
--- a/keyboards/preonic/keymaps/muzfuz/keymap.c
+++ b/keyboards/preonic/keymaps/muzfuz/keymap.c
@@ -197,7 +197,7 @@ uint16_t muse_counter = 0;
197uint8_t muse_offset = 70; 197uint8_t muse_offset = 70;
198uint16_t muse_tempo = 50; 198uint16_t muse_tempo = 50;
199 199
200bool encoder_update(bool clockwise) { 200bool encoder_update_user(uint8_t index, bool clockwise) {
201 if (muse_mode) { 201 if (muse_mode) {
202 if (IS_LAYER_ON(_RAISE)) { 202 if (IS_LAYER_ON(_RAISE)) {
203 if (clockwise) { 203 if (clockwise) {
@@ -224,7 +224,7 @@ bool encoder_update(bool clockwise) {
224 return true; 224 return true;
225} 225}
226 226
227void dip_update(uint8_t index, bool active) { 227bool dip_switch_update_user(uint8_t index, bool active) {
228 switch (index) { 228 switch (index) {
229 case 0: 229 case 0:
230 if (active) { 230 if (active) {
@@ -243,6 +243,7 @@ void dip_update(uint8_t index, bool active) {
243 #endif 243 #endif
244 } 244 }
245 } 245 }
246 return true;
246} 247}
247 248
248void matrix_scan_user(void) { 249void matrix_scan_user(void) {
diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c
index f127ea469..425c2bb3c 100644
--- a/keyboards/preonic/keymaps/xulkal/keymap.c
+++ b/keyboards/preonic/keymaps/xulkal/keymap.c
@@ -101,7 +101,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
101 return true; 101 return true;
102} 102}
103 103
104void dip_update(uint8_t index, bool active) { 104bool dip_switch_update_user(uint8_t index, bool active) {
105 switch (index) { 105 switch (index) {
106 case 0: 106 case 0:
107 if (active) { 107 if (active) {
@@ -120,6 +120,7 @@ void dip_update(uint8_t index, bool active) {
120 #endif 120 #endif
121 } 121 }
122 } 122 }
123 return true
123} 124}
124 125
125void matrix_scan_user(void) { 126void matrix_scan_user(void) {
diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c
index 0410d9a29..7ccff7061 100644
--- a/keyboards/preonic/rev3/rev3.c
+++ b/keyboards/preonic/rev3/rev3.c
@@ -43,23 +43,6 @@ led_config_t g_led_config = { {
43// 7 8 1 2 43// 7 8 1 2
44#endif 44#endif
45 45
46void matrix_init_kb(void) {
47 matrix_init_user();
48}
49
50void matrix_scan_kb(void) {
51 matrix_scan_user();
52}
53
54#ifdef DIP_SWITCH_ENABLE
55 __attribute__((weak))
56bool dip_update(uint8_t index, bool active) { return true;}
57
58 __attribute__((weak))
59bool dip_switch_update_user(uint8_t index, bool active) {
60 return dip_update(index, active);
61}
62#endif
63 46
64#ifdef SWAP_HANDS_ENABLE 47#ifdef SWAP_HANDS_ENABLE
65__attribute__ ((weak)) 48__attribute__ ((weak))
diff --git a/keyboards/sofle/keymaps/helltm/keymap.c b/keyboards/sofle/keymaps/helltm/keymap.c
index d3bdd5fa8..507b9e6d7 100644
--- a/keyboards/sofle/keymaps/helltm/keymap.c
+++ b/keyboards/sofle/keymaps/helltm/keymap.c
@@ -1,18 +1,18 @@
1 /* Copyright 2021 HellSingCoder 1/* Copyright 2021 HellSingCoder
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or 5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version. 6 * (at your option) any later version.
7 * 7 *
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 * 12 *
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18 18
@@ -25,6 +25,7 @@ enum sofle_layers {
25 _ADJUST, 25 _ADJUST,
26}; 26};
27 27
28// clang-format off
28enum custom_keycodes { 29enum custom_keycodes {
29 KC_QWERTY = SAFE_RANGE, 30 KC_QWERTY = SAFE_RANGE,
30 KC_GAMING, 31 KC_GAMING,
@@ -40,23 +41,22 @@ enum custom_keycodes {
40 KC_LAYER 41 KC_LAYER
41}; 42};
42 43
43
44const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 44const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45/* 45 /*
46 * QWERTY 46 * QWERTY
47 * ,-----------------------------------------. ,-----------------------------------------. 47 * ,-----------------------------------------. ,-----------------------------------------.
48 * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | 48 * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS |
49 * |------+------+------+------+------+------| |------+------+------+------+------+------| 49 * |------+------+------+------+------+------| |------+------+------+------+------+------|
50 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` | 50 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` |
51 * |------+------+------+------+------+------| |------+------+------+------+------+------| 51 * |------+------+------+------+------+------| |------+------+------+------+------+------|
52 * | Caps | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | 52 * | Caps | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
53 * |------+------+------+------+------+------| play | | mute |------+------+------+------+------+------| 53 * |------+------+------+------+------+------| play | | mute |------+------+------+------+------+------|
54 * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ | 54 * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ |
55 * `-----------------------------------------/ / \ \-----------------------------------------' 55 * `-----------------------------------------/ / \ \-----------------------------------------'
56 * | LGUI | LAlt | LAYER| LCTR | /Enter / \Space \ | [ | ] | - | = | 56 * | LGUI | LAlt | LAYER| LCTR | /Enter / \Space \ | [ | ] | - | = |
57 * | | | | |/ / \ \ | | | | | 57 * | | | | |/ / \ \ | | | | |
58 * `----------------------------------' '------''---------------------------' 58 * `----------------------------------' '------''---------------------------'
59 */ 59 */
60 60
61[_QWERTY] = LAYOUT( 61[_QWERTY] = LAYOUT(
62 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC_DEL, 62 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC_DEL,
@@ -155,54 +155,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
155 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 155 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
156 ) 156 )
157}; 157};
158// clang-format on
158 159
159#ifdef OLED_DRIVER_ENABLE 160#ifdef OLED_DRIVER_ENABLE
160 161
161/* 32 * 32 logo */ 162/* 32 * 32 logo */
162static void render_logo(void) { 163static void render_logo(void) {
163 static const char PROGMEM hell_logo[] = { 164 static const char PROGMEM hell_logo[] = {0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01, 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80, 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
164 0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80,
165 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00,
166 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f,
167 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01,
168 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80,
169 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38,
170 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b,
171 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
172 };
173 165
174 oled_write_raw_P(hell_logo, sizeof(hell_logo)); 166 oled_write_raw_P(hell_logo, sizeof(hell_logo));
175} 167}
176 168
177/* 32 * 14 os logos */ 169/* 32 * 14 os logos */
178static const char PROGMEM windows_logo[] = { 170static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00,
180 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00,
182 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
183};
184 171
185static const char PROGMEM mac_logo[] = { 172static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8,
187 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f,
189 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
190};
191 173
192/* Smart Backspace Delete */ 174/* Smart Backspace Delete */
193 175
194bool shift_held = false; 176bool shift_held = false;
195static uint16_t held_shift = 0; 177static uint16_t held_shift = 0;
196 178
197/* KEYBOARD PET START */ 179/* KEYBOARD PET START */
198 180
199/* settings */ 181/* settings */
200#define MIN_WALK_SPEED 10 182# define MIN_WALK_SPEED 10
201#define MIN_RUN_SPEED 40 183# define MIN_RUN_SPEED 40
202 184
203/* advanced settings */ 185/* advanced settings */
204#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms 186# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
205#define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 187# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
206 188
207/* timers */ 189/* timers */
208uint32_t anim_timer = 0; 190uint32_t anim_timer = 0;
@@ -212,167 +194,101 @@ uint32_t anim_sleep = 0;
212uint8_t current_frame = 0; 194uint8_t current_frame = 0;
213 195
214/* status variables */ 196/* status variables */
215int current_wpm = 0; 197int current_wpm = 0;
216led_t led_usb_state; 198led_t led_usb_state;
217 199
218bool isSneaking = false; 200bool isSneaking = false;
219bool isJumping = false; 201bool isJumping = false;
220bool showedJump = true; 202bool showedJump = true;
221 203
222/* logic */ 204/* logic */
223static void render_luna(int LUNA_X, int LUNA_Y) { 205static void render_luna(int LUNA_X, int LUNA_Y) {
224
225 /* Sit */ 206 /* Sit */
226 static const char PROGMEM sit[2][ANIM_SIZE] = { 207 static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */
227 /* 'sit1', 32x22px */ 208 {
228 { 209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 210 },
230 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 211
231 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 212 /* 'sit2', 32x22px */
232 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 213 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
234 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
235 },
236
237 /* 'sit2', 32x22px */
238 {
239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c,
240 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
241 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00,
242 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
244 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
245 }
246 };
247 214
248 /* Walk */ 215 /* Walk */
249 static const char PROGMEM walk[2][ANIM_SIZE] = { 216 static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */
250 /* 'walk1', 32x22px */ 217 {
251 { 218 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
252 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 219 },
253 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 220
254 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 221 /* 'walk2', 32x22px */
255 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 222 {
256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
257 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 224 }};
258 },
259
260 /* 'walk2', 32x22px */
261 {
262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
263 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
264 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
265 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00,
266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e,
267 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
268 }
269 };
270 225
271 /* Run */ 226 /* Run */
272 static const char PROGMEM run[2][ANIM_SIZE] = { 227 static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */
273 /* 'run1', 32x22px */ 228 {
274 { 229 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
275 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 230 },
276 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 231
277 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 232 /* 'run2', 32x22px */
278 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 233 {
279 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 234 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
280 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 235 }};
281 },
282
283 /* 'run2', 32x22px */
284 {
285 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
286 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
287 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00,
289 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37,
290 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
291 }
292 };
293 236
294 /* Bark */ 237 /* Bark */
295 static const char PROGMEM bark[2][ANIM_SIZE] = { 238 static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */
296 /* 'bark1', 32x22px */ 239 {
297 { 240 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
298 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 241 },
299 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 242
300 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 243 /* 'bark2', 32x22px */
301 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 244 {
302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 245 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
303 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 246 }};
304 },
305
306 /* 'bark2', 32x22px */
307 {
308 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40,
309 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
310 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
311 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10,
312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02,
313 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
314 }
315 };
316 247
317 /* Sneak */ 248 /* Sneak */
318 static const char PROGMEM sneak[2][ANIM_SIZE] = { 249 static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */
319 /* 'sneak1', 32x22px */ 250 {
320 { 251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
321 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 252 },
322 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 253
323 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 254 /* 'sneak2', 32x22px */
324 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 255 {
325 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
326 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 257 }};
327 },
328
329 /* 'sneak2', 32x22px */
330 {
331 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
332 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
333 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04,
334 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00,
335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04,
336 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
337 }
338 };
339 258
340 /* animation */ 259 /* animation */
341 void animate_luna(void) { 260 void animate_luna(void) {
342
343 /* jump */ 261 /* jump */
344 if (isJumping || !showedJump) { 262 if (isJumping || !showedJump) {
345
346 /* clear */ 263 /* clear */
347 oled_set_cursor(LUNA_X,LUNA_Y +2); 264 oled_set_cursor(LUNA_X, LUNA_Y + 2);
348 oled_write(" ", false); 265 oled_write(" ", false);
349 266
350 oled_set_cursor(LUNA_X,LUNA_Y -1); 267 oled_set_cursor(LUNA_X, LUNA_Y - 1);
351 268
352 showedJump = true; 269 showedJump = true;
353 } else { 270 } else {
354
355 /* clear */ 271 /* clear */
356 oled_set_cursor(LUNA_X,LUNA_Y -1); 272 oled_set_cursor(LUNA_X, LUNA_Y - 1);
357 oled_write(" ", false); 273 oled_write(" ", false);
358 274
359 oled_set_cursor(LUNA_X,LUNA_Y); 275 oled_set_cursor(LUNA_X, LUNA_Y);
360 } 276 }
361 277
362 /* switch frame */ 278 /* switch frame */
363 current_frame = (current_frame + 1) % 2; 279 current_frame = (current_frame + 1) % 2;
364 280
365 /* current status */ 281 /* current status */
366 if(led_usb_state.caps_lock) { 282 if (led_usb_state.caps_lock) {
367 oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); 283 oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE);
368 284
369 } else if(isSneaking) { 285 } else if (isSneaking) {
370 oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); 286 oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE);
371 287
372 } else if(current_wpm <= MIN_WALK_SPEED) { 288 } else if (current_wpm <= MIN_WALK_SPEED) {
373 oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); 289 oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE);
374 290
375 } else if(current_wpm <= MIN_RUN_SPEED) { 291 } else if (current_wpm <= MIN_RUN_SPEED) {
376 oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); 292 oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE);
377 293
378 } else { 294 } else {
@@ -381,7 +297,7 @@ static void render_luna(int LUNA_X, int LUNA_Y) {
381 } 297 }
382 298
383 /* animation timer */ 299 /* animation timer */
384 if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { 300 if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
385 anim_timer = timer_read32(); 301 anim_timer = timer_read32();
386 animate_luna(); 302 animate_luna();
387 } 303 }
@@ -390,10 +306,9 @@ static void render_luna(int LUNA_X, int LUNA_Y) {
390 if (current_wpm > 0) { 306 if (current_wpm > 0) {
391 oled_on(); 307 oled_on();
392 anim_sleep = timer_read32(); 308 anim_sleep = timer_read32();
393 } else if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { 309 } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
394 oled_off(); 310 oled_off();
395 } 311 }
396
397} 312}
398 313
399/* KEYBOARD PET END */ 314/* KEYBOARD PET END */
@@ -403,28 +318,28 @@ static void print_logo_narrow(void) {
403 318
404 /* wpm counter */ 319 /* wpm counter */
405 uint8_t n = get_current_wpm(); 320 uint8_t n = get_current_wpm();
406 char wpm_str[4]; 321 char wpm_str[4];
407 oled_set_cursor(0,14); 322 oled_set_cursor(0, 14);
408 wpm_str[3] = '\0'; 323 wpm_str[3] = '\0';
409 wpm_str[2] = '0' + n % 10; 324 wpm_str[2] = '0' + n % 10;
410 wpm_str[1] = '0' + ( n /= 10) % 10; 325 wpm_str[1] = '0' + (n /= 10) % 10;
411 wpm_str[0] = '0' + n / 10; 326 wpm_str[0] = '0' + n / 10;
412 oled_write(wpm_str, false); 327 oled_write(wpm_str, false);
413 328
414 oled_set_cursor(0,15); 329 oled_set_cursor(0, 15);
415 oled_write(" wpm", false); 330 oled_write(" wpm", false);
416} 331}
417 332
418static void print_status_narrow(void) { 333static void print_status_narrow(void) {
419 /* Print current mode */ 334 /* Print current mode */
420 oled_set_cursor(0,0); 335 oled_set_cursor(0, 0);
421 if (keymap_config.swap_lctl_lgui) { 336 if (keymap_config.swap_lctl_lgui) {
422 oled_write_raw_P(mac_logo, sizeof(mac_logo)); 337 oled_write_raw_P(mac_logo, sizeof(mac_logo));
423 } else { 338 } else {
424 oled_write_raw_P(windows_logo, sizeof(windows_logo)); 339 oled_write_raw_P(windows_logo, sizeof(windows_logo));
425 } 340 }
426 341
427 oled_set_cursor(0,3); 342 oled_set_cursor(0, 3);
428 343
429 switch (get_highest_layer(default_layer_state)) { 344 switch (get_highest_layer(default_layer_state)) {
430 case _QWERTY: 345 case _QWERTY:
@@ -437,12 +352,12 @@ static void print_status_narrow(void) {
437 oled_write("UNDEF", false); 352 oled_write("UNDEF", false);
438 } 353 }
439 354
440 oled_set_cursor(0,5); 355 oled_set_cursor(0, 5);
441 356
442 /* Print current layer */ 357 /* Print current layer */
443 oled_write("LAYER", false); 358 oled_write("LAYER", false);
444 359
445 oled_set_cursor(0,6); 360 oled_set_cursor(0, 6);
446 361
447 switch (get_highest_layer(layer_state)) { 362 switch (get_highest_layer(layer_state)) {
448 case _QWERTY: 363 case _QWERTY:
@@ -465,25 +380,22 @@ static void print_status_narrow(void) {
465 } 380 }
466 381
467 /* caps lock */ 382 /* caps lock */
468 oled_set_cursor(0,8); 383 oled_set_cursor(0, 8);
469 oled_write("CPSLK", led_usb_state.caps_lock); 384 oled_write("CPSLK", led_usb_state.caps_lock);
470 385
471 /* KEYBOARD PET RENDER START */ 386 /* KEYBOARD PET RENDER START */
472 387
473 render_luna(0,13); 388 render_luna(0, 13);
474 389
475 /* KEYBOARD PET RENDER END */ 390 /* KEYBOARD PET RENDER END */
476} 391}
477 392
478oled_rotation_t oled_init_user(oled_rotation_t rotation) { 393oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
479 return OLED_ROTATION_270;
480}
481 394
482void oled_task_user(void) { 395void oled_task_user(void) {
483
484 /* KEYBOARD PET VARIABLES START */ 396 /* KEYBOARD PET VARIABLES START */
485 397
486 current_wpm = get_current_wpm(); 398 current_wpm = get_current_wpm();
487 led_usb_state = host_keyboard_led_state(); 399 led_usb_state = host_keyboard_led_state();
488 400
489 /* KEYBOARD PET VARIABLES END */ 401 /* KEYBOARD PET VARIABLES END */
@@ -554,7 +466,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
554 } 466 }
555 break; 467 break;
556 case KC_NXTWD: 468 case KC_NXTWD:
557 if (record->event.pressed) { 469 if (record->event.pressed) {
558 if (keymap_config.swap_lctl_lgui) { 470 if (keymap_config.swap_lctl_lgui) {
559 register_mods(mod_config(MOD_LALT)); 471 register_mods(mod_config(MOD_LALT));
560 register_code(KC_RIGHT); 472 register_code(KC_RIGHT);
@@ -575,7 +487,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
575 case KC_LSTRT: 487 case KC_LSTRT:
576 if (record->event.pressed) { 488 if (record->event.pressed) {
577 if (keymap_config.swap_lctl_lgui) { 489 if (keymap_config.swap_lctl_lgui) {
578 /* CMD-arrow on Mac, but we have CTL and GUI swapped */ 490 /* CMD-arrow on Mac, but we have CTL and GUI swapped */
579 register_mods(mod_config(MOD_LCTL)); 491 register_mods(mod_config(MOD_LCTL));
580 register_code(KC_LEFT); 492 register_code(KC_LEFT);
581 } else { 493 } else {
@@ -655,7 +567,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
655 } 567 }
656 return false; 568 return false;
657 569
658 /* Smart Backspace Delete */ 570 /* Smart Backspace Delete */
659 571
660 case KC_RSFT: 572 case KC_RSFT:
661 case KC_LSFT: 573 case KC_LSFT:
@@ -679,7 +591,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
679 } 591 }
680 return false; 592 return false;
681 593
682 /* LAYER */ 594 /* LAYER */
683 595
684 case KC_LAYER: 596 case KC_LAYER:
685 if (record->event.pressed) { 597 if (record->event.pressed) {
@@ -687,7 +599,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
687 if (record->event.pressed) { 599 if (record->event.pressed) {
688 if (get_highest_layer(default_layer_state) == _QWERTY) { 600 if (get_highest_layer(default_layer_state) == _QWERTY) {
689 set_single_persistent_default_layer(_GAMING); 601 set_single_persistent_default_layer(_GAMING);
690 } else if(get_highest_layer(default_layer_state) == _GAMING) { 602 } else if (get_highest_layer(default_layer_state) == _GAMING) {
691 set_single_persistent_default_layer(_QWERTY); 603 set_single_persistent_default_layer(_QWERTY);
692 } 604 }
693 } 605 }
@@ -701,7 +613,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
701 } 613 }
702 return false; 614 return false;
703 615
704 /* KEYBOARD PET STATUS START */ 616 /* KEYBOARD PET STATUS START */
705 617
706 case KC_LCTL: 618 case KC_LCTL:
707 case KC_RCTL: 619 case KC_RCTL:
@@ -713,30 +625,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
713 break; 625 break;
714 case KC_SPC: 626 case KC_SPC:
715 if (record->event.pressed) { 627 if (record->event.pressed) {
716 isJumping = true; 628 isJumping = true;
717 showedJump = false; 629 showedJump = false;
718 } else { 630 } else {
719 isJumping = false; 631 isJumping = false;
720 } 632 }
721 break; 633 break;
722 634
723 /* KEYBOARD PET STATUS END */ 635 /* KEYBOARD PET STATUS END */
724 } 636 }
725 return true; 637 return true;
726} 638}
727 639
728#ifdef ENCODER_ENABLE 640#ifdef ENCODER_ENABLE
729 641
730void encoder_update_user(uint8_t index, bool clockwise) { 642bool encoder_update_user(uint8_t index, bool clockwise) {
731 if (index == 0) { 643 if (index == 0) {
732 if (clockwise) { 644 if (clockwise) {
733 if(shift_held) { 645 if (shift_held) {
734 tap_code(KC_MNXT); 646 tap_code(KC_MNXT);
735 } else { 647 } else {
736 tap_code(KC_RIGHT); 648 tap_code(KC_RIGHT);
737 } 649 }
738 } else { 650 } else {
739 if(shift_held) { 651 if (shift_held) {
740 tap_code(KC_MPRV); 652 tap_code(KC_MPRV);
741 } else { 653 } else {
742 tap_code(KC_LEFT); 654 tap_code(KC_LEFT);
@@ -744,19 +656,20 @@ void encoder_update_user(uint8_t index, bool clockwise) {
744 } 656 }
745 } else if (index == 1) { 657 } else if (index == 1) {
746 if (clockwise) { 658 if (clockwise) {
747 if(shift_held) { 659 if (shift_held) {
748 tap_code(KC_VOLU); 660 tap_code(KC_VOLU);
749 } else { 661 } else {
750 tap_code(KC_DOWN); 662 tap_code(KC_DOWN);
751 } 663 }
752 } else { 664 } else {
753 if(shift_held) { 665 if (shift_held) {
754 tap_code(KC_VOLD); 666 tap_code(KC_VOLD);
755 } else { 667 } else {
756 tap_code(KC_UP); 668 tap_code(KC_UP);
757 } 669 }
758 } 670 }
759 } 671 }
672 return true;
760} 673}
761 674
762#endif 675#endif
diff --git a/keyboards/work_louder/loop/keymaps/default/keymap.c b/keyboards/work_louder/loop/keymaps/default/keymap.c
index 25ecb15a4..a2e35d967 100644
--- a/keyboards/work_louder/loop/keymaps/default/keymap.c
+++ b/keyboards/work_louder/loop/keymaps/default/keymap.c
@@ -15,10 +15,8 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18 18// clang-format off
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 /* Base */
22 [0] = LAYOUT( 20 [0] = LAYOUT(
23 KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1) 21 KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1)
24 ), 22 ),
@@ -29,9 +27,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 RESET, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______ 27 RESET, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______
30 ) 28 )
31}; 29};
30// clang-format on
32 31
33 32// bool encoder_update_user(uint8_t index, bool clockwise) {
34// void encoder_update_user(uint8_t index, bool clockwise) {
35// if (index == 0) { 33// if (index == 0) {
36// if (clockwise) { 34// if (clockwise) {
37// tap_code(KC_VOLD); 35// tap_code(KC_VOLD);
@@ -51,4 +49,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51// rgb_matrix_step(); 49// rgb_matrix_step();
52// } 50// }
53// } 51// }
52// return false;
54// } 53// }
diff --git a/keyboards/work_louder/nano/keymaps/default/keymap.c b/keyboards/work_louder/nano/keymaps/default/keymap.c
index e1b4bbcb9..d4647657e 100644
--- a/keyboards/work_louder/nano/keymaps/default/keymap.c
+++ b/keyboards/work_louder/nano/keymaps/default/keymap.c
@@ -15,23 +15,16 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 /* Base */ 19 /* Base */
22 [0] = LAYOUT( 20 [0] = LAYOUT(KC_PSCR, KC_LSFT, MO(1)),
23 KC_PSCR, KC_LSFT, MO(1) 21 [1] = LAYOUT(RESET, KC_LCTL, _______)};
24 ),
25 [1] = LAYOUT(
26 RESET, KC_LCTL, _______
27 )
28};
29
30 22
31// void encoder_update_user(uint8_t index, bool clockwise) { 23// bool encoder_update_user(uint8_t index, bool clockwise) {
32// if (clockwise) { 24// if (clockwise) {
33// tap_code(KC_PGDN); 25// tap_code(KC_PGDN);
34// } else { 26// } else {
35// tap_code(KC_PGUP); 27// tap_code(KC_PGUP);
36// } 28// }
29// return false;
37// } 30// }
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 82594b9fd..1384221b5 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -368,7 +368,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
368#endif // ENCODER_ENABLE 368#endif // ENCODER_ENABLE
369 369
370#ifdef KEYBOARD_planck_rev6 370#ifdef KEYBOARD_planck_rev6
371void dip_update(uint8_t index, bool active) { 371bool dip_switch_update_user(uint8_t index, bool active) {
372 switch (index) { 372 switch (index) {
373 case 0: 373 case 0:
374 if (active) { 374 if (active) {
@@ -391,6 +391,7 @@ void dip_update(uint8_t index, bool active) {
391 userspace_config.nuke_switch = active; 391 userspace_config.nuke_switch = active;
392 break; 392 break;
393 } 393 }
394 return true;
394} 395}
395#endif // KEYBOARD_planck_rev6 396#endif // KEYBOARD_planck_rev6
396 397
diff --git a/layouts/community/ortho_4x12/juno/keymap.c b/layouts/community/ortho_4x12/juno/keymap.c
index b3ef8fce5..344759ed1 100644
--- a/layouts/community/ortho_4x12/juno/keymap.c
+++ b/layouts/community/ortho_4x12/juno/keymap.c
@@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
395 return true; 395 return true;
396} 396}
397 397
398void dip_update(uint8_t index, bool active) { 398bool dip_switch_update_user(uint8_t index, bool active) {
399 switch (index) { 399 switch (index) {
400 case 0: 400 case 0:
401 if (active) { 401 if (active) {
@@ -420,6 +420,7 @@ void dip_update(uint8_t index, bool active) {
420 #endif 420 #endif
421 } 421 }
422 } 422 }
423 return true;
423} 424}
424 425
425void matrix_scan_user(void) { 426void matrix_scan_user(void) {
diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c
index 82ff4d63a..d4c840f17 100644
--- a/layouts/community/ortho_4x12/junonum/keymap.c
+++ b/layouts/community/ortho_4x12/junonum/keymap.c
@@ -293,7 +293,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
293 return true; 293 return true;
294} 294}
295 295
296void dip_update(uint8_t index, bool active) { 296bool dip_switch_update_user(uint8_t index, bool active) {
297 switch (index) { 297 switch (index) {
298 case 0: 298 case 0:
299 if (active) { 299 if (active) {
@@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) {
318#endif 318#endif
319 } 319 }
320 } 320 }
321 return true;
321} 322}
322 323
323void matrix_scan_user(void) { 324void matrix_scan_user(void) {