summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2023-04-03 10:18:17 -0600
committerGitHub <noreply@github.com>2023-04-03 10:18:17 -0600
commit36ab0c0aaa613fe0946e10133315b071c0d87012 (patch)
treeac87fe394264e2b265ad3db376bb88a91d084898
parent7e48a4e80f4c3975cf0aae68986c7ead2576dcf3 (diff)
Add core/fallback encoder behaviour (#20320)
-rw-r--r--docs/feature_encoders.md14
-rw-r--r--keyboards/acheron/shark/beta/beta.c11
-rw-r--r--keyboards/adafruit/macropad/macropad.c14
-rw-r--r--keyboards/aidansmithdotdev/fine40/fine40.c15
-rw-r--r--keyboards/anavi/knob1/knob1.c12
-rw-r--r--keyboards/anavi/macropad10/macropad10.c16
-rw-r--r--keyboards/ano/ano.c24
-rw-r--r--keyboards/atlantis/ps17/ps17.c17
-rw-r--r--keyboards/bolsa/damapad/damapad.c14
-rw-r--r--keyboards/cannonkeys/balance/balance.c10
-rw-r--r--keyboards/cannonkeys/ortho60v2/ortho60v2.c14
-rw-r--r--keyboards/checkerboards/phoenix45_ortho/phoenix45_ortho.c29
-rw-r--r--keyboards/checkerboards/quark/quark.c29
-rw-r--r--keyboards/checkerboards/quark_squared/quark_squared.c12
-rw-r--r--keyboards/chocofly/chocofly.c16
-rw-r--r--keyboards/ck60i/ck60i.c12
-rw-r--r--keyboards/coban/pad3a/pad3a.c29
-rw-r--r--keyboards/crbn/crbn.c27
-rw-r--r--keyboards/custommk/genesis/rev1/rev1.c38
-rw-r--r--keyboards/custommk/genesis/rev2/rev2.c39
-rw-r--r--keyboards/drhigsby/packrat/packrat.c12
-rw-r--r--keyboards/drop/sense75/sense75.c13
-rw-r--r--keyboards/dumbpad/v3x/v3x.c19
-rw-r--r--keyboards/evolv/evolv.c10
-rw-r--r--keyboards/eyeohdesigns/sprh/sprh.c14
-rw-r--r--keyboards/eyeohdesigns/theboulevard/theboulevard.c14
-rw-r--r--keyboards/ffkeebs/puca/puca.c11
-rw-r--r--keyboards/geistmaschine/geist/geist.c21
-rw-r--r--keyboards/geistmaschine/macropod/macropod.c21
-rw-r--r--keyboards/gmmk/numpad/numpad.c14
-rw-r--r--keyboards/gmmk/pro/pro.c30
-rw-r--r--keyboards/gorthage_truck/gorthage_truck.c12
-rw-r--r--keyboards/handwired/daskeyboard/daskeyboard4/daskeyboard4.c19
-rw-r--r--keyboards/handwired/maverick0197/keydeck8/keydeck8.c33
-rw-r--r--keyboards/handwired/swiftrax/bumblebee/bumblebee.c11
-rw-r--r--keyboards/handwired/swiftrax/digicarp65/digicarp65.c14
-rw-r--r--keyboards/handwired/tsubasa/tsubasa.c14
-rw-r--r--keyboards/io_mini1800/io_mini1800.c14
-rw-r--r--keyboards/jagdpietr/drakon/drakon.c10
-rw-r--r--keyboards/jkeys_design/gentleman65/gentleman65.c12
-rw-r--r--keyboards/jkeys_design/gentleman65_se_s/gentleman65_se_s.c14
-rw-r--r--keyboards/kapcave/arya/arya.c10
-rw-r--r--keyboards/keebio/dsp40/rev1/rev1.c12
-rw-r--r--keyboards/keebsforall/coarse60/coarse60.c12
-rw-r--r--keyboards/keebsforall/freebirdnp/pro/pro.c28
-rw-r--r--keyboards/keychron/v10/v10.c14
-rw-r--r--keyboards/keychron/v6/v6.c14
-rw-r--r--keyboards/keyprez/rhino/rhino.c6
-rw-r--r--keyboards/keyprez/unicorn/unicorn.c14
-rw-r--r--keyboards/keystonecaps/gameroyadvance/gameroyadvance.c28
-rw-r--r--keyboards/kiwikeebs/macro/macro.c12
-rw-r--r--keyboards/kiwikeebs/macro_v2/macro_v2.c12
-rw-r--r--keyboards/kiwikey/borderland/borderland.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c14
-rw-r--r--keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c14
-rw-r--r--keyboards/latincompass/latinpadble/latinpadble.c10
-rw-r--r--keyboards/ll3macorn/bongopad/bongopad.c16
-rw-r--r--keyboards/lpad/lpad.c18
-rw-r--r--keyboards/lw67/lw67.c13
-rw-r--r--keyboards/lw75/lw75.c15
-rw-r--r--keyboards/lyso1/lck75/lck75.c12
-rw-r--r--keyboards/macro1/macro1.c15
-rw-r--r--keyboards/mechwild/bde/rev2/rev2.c16
-rwxr-xr-xkeyboards/mechwild/mercutio/mercutio.c19
-rw-r--r--keyboards/mechwild/obe/obe.c16
-rw-r--r--keyboards/mechwild/waka60/waka60.c16
-rw-r--r--keyboards/meletrix/zoom65/zoom65.c6
-rw-r--r--keyboards/meletrix/zoom65_lite/zoom65_lite.c8
-rw-r--r--keyboards/metamechs/timberwolf/timberwolf.c10
-rw-r--r--keyboards/mini_elixivy/mini_elixivy.c11
-rw-r--r--keyboards/mk65/mk65.c31
-rw-r--r--keyboards/mwstudio/alicekk/alicekk.c14
-rw-r--r--keyboards/mwstudio/mw80/mw80.c31
-rw-r--r--keyboards/nullbitsco/snap/snap.c14
-rw-r--r--keyboards/onekeyco/dango40/dango40.c10
-rw-r--r--keyboards/orthocode/orthocode.c13
-rw-r--r--keyboards/pauperboards/brick/brick.c31
-rw-r--r--keyboards/pearlboards/atlas/atlas.c14
-rw-r--r--keyboards/pearlboards/pandora/pandora.c18
-rw-r--r--keyboards/pearlboards/zeus/zeus.c17
-rw-r--r--keyboards/pearlboards/zeuspad/zeuspad.c18
-rw-r--r--keyboards/pica40/rev1/rev1.c12
-rw-r--r--keyboards/program_yoink/program_yoink.c29
-rw-r--r--keyboards/rart/rart75hs/rart75hs.c16
-rw-r--r--keyboards/rart/rart75m/rart75m.c16
-rw-r--r--keyboards/rart/rartland/rartland.c16
-rw-r--r--keyboards/reedskeebs/alish40/alish40.c22
-rw-r--r--keyboards/ristretto/ristretto.c12
-rw-r--r--keyboards/rmkeebs/rm_numpad/rm_numpad.c31
-rw-r--r--keyboards/rotr/rotr.c10
-rw-r--r--keyboards/rubi/rubi.c5
-rw-r--r--keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c14
-rw-r--r--keyboards/sneakbox/aliceclonergb/aliceclonergb.c14
-rw-r--r--keyboards/spacey/spacey.c12
-rw-r--r--keyboards/sthlmkb/litl/litl.c14
-rw-r--r--keyboards/taleguers/taleguers75/taleguers75.c11
-rw-r--r--keyboards/tau4/tau4.c14
-rw-r--r--keyboards/thepanduuh/degenpad/degenpad.c31
-rw-r--r--keyboards/tkc/portico75/portico75.c16
-rwxr-xr-xkeyboards/tominabox1/bigboy/bigboy.c31
-rw-r--r--keyboards/ungodly/nines/nines.c34
-rw-r--r--keyboards/viendi8l/viendi8l.c11
-rw-r--r--keyboards/work_louder/work_board/work_board.c14
-rw-r--r--keyboards/wuque/mammoth75x/mammoth75x.c6
-rw-r--r--keyboards/wuque/serneity65/serneity65.c11
-rw-r--r--keyboards/z12/z12.c23
-rw-r--r--quantum/encoder.c24
107 files changed, 30 insertions, 1759 deletions
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index 1c521a4eff..74857c265d 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -102,9 +102,9 @@ Using encoder mapping pumps events through the normal QMK keycode processing pip
## Callbacks
-When not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`:
+?> [**Default Behaviour**](https://github.com/qmk/qmk_firmware/blob/master/quantum/encoder.c#L79-#L98): all encoders installed will function as volume up (`KC_VOLU`) on clockwise rotation and volume down (`KC_VOLD`) on counter-clockwise rotation. If you do not wish to override this, no further configuration is necessary.
-?> Those who are adding new keyboard support where encoders are enabled at the keyboard level should include basic encoder functionality at the keyboard level (`<keyboard>.c`) using the `encoder_update_kb()` function, that way it works for QMK Configuator users and exists in general.
+If you would like the alter the default behaviour, and are not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`:
```c
bool encoder_update_kb(uint8_t index, bool clockwise) {
@@ -113,9 +113,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
}
if (index == 0) { /* First encoder */
if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
+ tap_code(KC_PGDN);
} else {
- tap_code_delay(KC_VOLD, 10);
+ tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
@@ -134,9 +134,9 @@ or `keymap.c`:
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
+ tap_code(KC_PGDN);
} else {
- tap_code_delay(KC_VOLD, 10);
+ tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
@@ -149,7 +149,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
```
-!> If you return `true` in the keymap level `_user` function, it will allow the keyboard level encoder code to run on top of your own. Returning `false` will override the keyboard level function, if setup correctly. This is generally the safest option to avoid confusion.
+!> If you return `true` in the keymap level `_user` function, it will allow the keyboard/core level encoder code to run on top of your own. Returning `false` will override the keyboard level function, if setup correctly. This is generally the safest option to avoid confusion.
## Hardware
diff --git a/keyboards/acheron/shark/beta/beta.c b/keyboards/acheron/shark/beta/beta.c
index 06fd36f797..5592353ad7 100644
--- a/keyboards/acheron/shark/beta/beta.c
+++ b/keyboards/acheron/shark/beta/beta.c
@@ -20,14 +20,3 @@ void board_init(void) {
setPinInput(B6);
setPinInput(B7);
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if(!encoder_update_user(index, clockwise)) return false;
- if (index == 0) {
- if (clockwise) tap_code_delay(KC_VOLU, 10);
- else tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
diff --git a/keyboards/adafruit/macropad/macropad.c b/keyboards/adafruit/macropad/macropad.c
index 5cffdc6c97..819b5067d8 100644
--- a/keyboards/adafruit/macropad/macropad.c
+++ b/keyboards/adafruit/macropad/macropad.c
@@ -40,17 +40,3 @@ led_config_t g_led_config = { {
} };
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/aidansmithdotdev/fine40/fine40.c b/keyboards/aidansmithdotdev/fine40/fine40.c
index 0bd190321a..2e60e7c921 100644
--- a/keyboards/aidansmithdotdev/fine40/fine40.c
+++ b/keyboards/aidansmithdotdev/fine40/fine40.c
@@ -68,18 +68,3 @@ bool oled_task_kb(void) {
return(true);
}
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- // Volume control
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/anavi/knob1/knob1.c b/keyboards/anavi/knob1/knob1.c
index c1ed7b7726..bb6f1e38bf 100644
--- a/keyboards/anavi/knob1/knob1.c
+++ b/keyboards/anavi/knob1/knob1.c
@@ -14,18 +14,6 @@ void keyboard_post_init_kb(void) {
keyboard_post_init_user();
}
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
diff --git a/keyboards/anavi/macropad10/macropad10.c b/keyboards/anavi/macropad10/macropad10.c
deleted file mode 100644
index bebefd0da9..0000000000
--- a/keyboards/anavi/macropad10/macropad10.c
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2022 Leon Anavi <leon@anavi.org>
-// SPDX-License-Identifier: GPL-2.0-or-later
-#include "encoder.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-#endif
-
diff --git a/keyboards/ano/ano.c b/keyboards/ano/ano.c
index 0b6926deaf..925a24fbf6 100644
--- a/keyboards/ano/ano.c
+++ b/keyboards/ano/ano.c
@@ -15,27 +15,3 @@
*/
#include "ano.h"
-
-/* The encoder_update_user is a function.
- * It'll be called by QMK every time you turn the encoder.
- *
- * The index parameter tells you which encoder was turned. If you only have
- * one encoder, the index will always be zero.
- *
- * The clockwise parameter tells you the direction of the encoder. It'll be
- * true when you turned the encoder clockwise, and false otherwise.
- */
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_AUDIO_VOL_UP);
- } else {
- tap_code(KC_AUDIO_VOL_DOWN);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/atlantis/ps17/ps17.c b/keyboards/atlantis/ps17/ps17.c
index ccac1ce923..d660bdee6a 100644
--- a/keyboards/atlantis/ps17/ps17.c
+++ b/keyboards/atlantis/ps17/ps17.c
@@ -19,23 +19,6 @@ void keyboard_pre_init_kb(void) {
keyboard_pre_init_user();
}
-#if defined(ENCODER_ENABLE)
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- /* Don't process further events if user function exists and returns false */
- return false;
- }
-
- /* Ignore index - only one encoder on this board */
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return false;
-}
-#endif
-
#ifdef RGB_MATRIX_ENABLE
void suspend_power_down_kb(void) {
/* Disable indicator LEDs when going to sleep */
diff --git a/keyboards/bolsa/damapad/damapad.c b/keyboards/bolsa/damapad/damapad.c
index d57a60c166..c2464d3f95 100644
--- a/keyboards/bolsa/damapad/damapad.c
+++ b/keyboards/bolsa/damapad/damapad.c
@@ -65,17 +65,3 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/cannonkeys/balance/balance.c b/keyboards/cannonkeys/balance/balance.c
index 2bb4485521..b0de0a3ae3 100644
--- a/keyboards/cannonkeys/balance/balance.c
+++ b/keyboards/cannonkeys/balance/balance.c
@@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "balance.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/cannonkeys/ortho60v2/ortho60v2.c b/keyboards/cannonkeys/ortho60v2/ortho60v2.c
index 0fc9239ee8..3e0248abda 100644
--- a/keyboards/cannonkeys/ortho60v2/ortho60v2.c
+++ b/keyboards/cannonkeys/ortho60v2/ortho60v2.c
@@ -15,17 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ortho60v2.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
diff --git a/keyboards/checkerboards/phoenix45_ortho/phoenix45_ortho.c b/keyboards/checkerboards/phoenix45_ortho/phoenix45_ortho.c
deleted file mode 100644
index cb1615aef0..0000000000
--- a/keyboards/checkerboards/phoenix45_ortho/phoenix45_ortho.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 Nathan Spears
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLD, 10);
- } else {
- tap_code_delay(KC_VOLU, 10);
- }
- }
- return true;
-}
diff --git a/keyboards/checkerboards/quark/quark.c b/keyboards/checkerboards/quark/quark.c
deleted file mode 100644
index 22769b51c1..0000000000
--- a/keyboards/checkerboards/quark/quark.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2020 Nathan Spears
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLD, 10);
- } else {
- tap_code_delay(KC_VOLU, 10);
- }
- }
- return true;
-}
diff --git a/keyboards/checkerboards/quark_squared/quark_squared.c b/keyboards/checkerboards/quark_squared/quark_squared.c
index 1ead754eaf..fbd7346cc0 100644
--- a/keyboards/checkerboards/quark_squared/quark_squared.c
+++ b/keyboards/checkerboards/quark_squared/quark_squared.c
@@ -15,15 +15,3 @@
*/
#include "quark_squared.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLD, 10);
- } else {
- tap_code_delay(KC_VOLU, 10);
- }
- }
- return true;
-}
diff --git a/keyboards/chocofly/chocofly.c b/keyboards/chocofly/chocofly.c
deleted file mode 100644
index 0f00afe2f9..0000000000
--- a/keyboards/chocofly/chocofly.c
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2022 Vitaly Volkov (@vlkv)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return false;
-}
-#endif
diff --git a/keyboards/ck60i/ck60i.c b/keyboards/ck60i/ck60i.c
index 7e5cd33218..b102aad40c 100644
--- a/keyboards/ck60i/ck60i.c
+++ b/keyboards/ck60i/ck60i.c
@@ -16,15 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ck60i.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/coban/pad3a/pad3a.c b/keyboards/coban/pad3a/pad3a.c
deleted file mode 100644
index bd07a83a8f..0000000000
--- a/keyboards/coban/pad3a/pad3a.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 RyanDam (https://github.com/RyanDam)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#if defined(ENCODER_ENABLE)
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
diff --git a/keyboards/crbn/crbn.c b/keyboards/crbn/crbn.c
deleted file mode 100644
index 91787f9c1c..0000000000
--- a/keyboards/crbn/crbn.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2020 Harry Herring
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include "quantum.h"
-
-/* Encoder setting. only one encoder despite 4 possible spots */
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/custommk/genesis/rev1/rev1.c b/keyboards/custommk/genesis/rev1/rev1.c
deleted file mode 100644
index f81c6943b3..0000000000
--- a/keyboards/custommk/genesis/rev1/rev1.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2020 customMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- /* top left encoder */
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- /* top right encoder */
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/custommk/genesis/rev2/rev2.c b/keyboards/custommk/genesis/rev2/rev2.c
deleted file mode 100644
index 5993ebb8c6..0000000000
--- a/keyboards/custommk/genesis/rev2/rev2.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2020 customMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- /* top left encoder */
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- /* top right encoder */
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return false;
-}
-
diff --git a/keyboards/drhigsby/packrat/packrat.c b/keyboards/drhigsby/packrat/packrat.c
index 0f4a479956..dc8f3b41b4 100644
--- a/keyboards/drhigsby/packrat/packrat.c
+++ b/keyboards/drhigsby/packrat/packrat.c
@@ -14,15 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "packrat.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
diff --git a/keyboards/drop/sense75/sense75.c b/keyboards/drop/sense75/sense75.c
index a8cb28b054..cbc194ee8f 100644
--- a/keyboards/drop/sense75/sense75.c
+++ b/keyboards/drop/sense75/sense75.c
@@ -133,16 +133,3 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 1, H_16, G_16, I_16 }
};
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
-
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return false;
-}
-#endif
diff --git a/keyboards/dumbpad/v3x/v3x.c b/keyboards/dumbpad/v3x/v3x.c
index 7af3c4e838..9a4c8f4442 100644
--- a/keyboards/dumbpad/v3x/v3x.c
+++ b/keyboards/dumbpad/v3x/v3x.c
@@ -100,22 +100,3 @@ bool led_update_kb(led_t led_state) {
writePin(LED_02, !led_state.num_lock);
return true;
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- switch (get_highest_layer(layer_state)) {
- case 0:
- // main layer, volume
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
diff --git a/keyboards/evolv/evolv.c b/keyboards/evolv/evolv.c
index 3f27628946..54f92c9dbc 100644
--- a/keyboards/evolv/evolv.c
+++ b/keyboards/evolv/evolv.c
@@ -16,13 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "evolv.h"
-
-#ifndef MEDIA_KEY_DELAY
-# define MEDIA_KEY_DELAY 100
-#endif
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, MEDIA_KEY_DELAY);
- return true;
-}
diff --git a/keyboards/eyeohdesigns/sprh/sprh.c b/keyboards/eyeohdesigns/sprh/sprh.c
index 903e0c68e2..f73b463d79 100644
--- a/keyboards/eyeohdesigns/sprh/sprh.c
+++ b/keyboards/eyeohdesigns/sprh/sprh.c
@@ -14,17 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "sprh.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/eyeohdesigns/theboulevard/theboulevard.c b/keyboards/eyeohdesigns/theboulevard/theboulevard.c
index a2b40cd9e9..5671425698 100644
--- a/keyboards/eyeohdesigns/theboulevard/theboulevard.c
+++ b/keyboards/eyeohdesigns/theboulevard/theboulevard.c
@@ -15,17 +15,3 @@
*/
#include "theboulevard.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/ffkeebs/puca/puca.c b/keyboards/ffkeebs/puca/puca.c
index 21944a9e5d..9d9f739a6f 100644
--- a/keyboards/ffkeebs/puca/puca.c
+++ b/keyboards/ffkeebs/puca/puca.c
@@ -29,17 +29,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
return true;
}
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10); // Right
- } else {
- tap_code_delay(KC_VOLD, 10); // Left
- }
- return false;
-}
-
-
// OLED
#ifdef OLED_ENABLE
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
diff --git a/keyboards/geistmaschine/geist/geist.c b/keyboards/geistmaschine/geist/geist.c
deleted file mode 100644
index 2f6825e2ee..0000000000
--- a/keyboards/geistmaschine/geist/geist.c
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2022 QMK
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "quantum.h"
-
-// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map.
-#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE)
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false; /* Don't process further events if user function exists and returns false */
- }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/geistmaschine/macropod/macropod.c b/keyboards/geistmaschine/macropod/macropod.c
deleted file mode 100644
index 2f6825e2ee..0000000000
--- a/keyboards/geistmaschine/macropod/macropod.c
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2022 QMK
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "quantum.h"
-
-// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map.
-#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE)
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false; /* Don't process further events if user function exists and returns false */
- }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/gmmk/numpad/numpad.c b/keyboards/gmmk/numpad/numpad.c
index ed4fed2667..f1a46170fd 100644
--- a/keyboards/gmmk/numpad/numpad.c
+++ b/keyboards/gmmk/numpad/numpad.c
@@ -120,17 +120,3 @@ void keyboard_pre_init_user(void) {
# endif
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c
deleted file mode 100644
index 3df15d71f2..0000000000
--- a/keyboards/gmmk/pro/pro.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return false;
-}
-#endif
diff --git a/keyboards/gorthage_truck/gorthage_truck.c b/keyboards/gorthage_truck/gorthage_truck.c
index 2745666916..c6f75d7270 100644
--- a/keyboards/gorthage_truck/gorthage_truck.c
+++ b/keyboards/gorthage_truck/gorthage_truck.c
@@ -15,15 +15,3 @@
*/
#include "gorthage_truck.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/handwired/daskeyboard/daskeyboard4/daskeyboard4.c b/keyboards/handwired/daskeyboard/daskeyboard4/daskeyboard4.c
deleted file mode 100644
index 37d67007df..0000000000
--- a/keyboards/handwired/daskeyboard/daskeyboard4/daskeyboard4.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2022 Commander1024 (@Commander1024)
-// SPDX-License-Identifier: GPL-2.0-or-later
-#include "quantum.h"
-
-// rotary encoder
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- // Volume control
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- return true;
-};
-#endif
diff --git a/keyboards/handwired/maverick0197/keydeck8/keydeck8.c b/keyboards/handwired/maverick0197/keydeck8/keydeck8.c
deleted file mode 100644
index 663306a9bb..0000000000
--- a/keyboards/handwired/maverick0197/keydeck8/keydeck8.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright 2023 Maverick0197
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- //if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- //}
- return false;
-};
-#endif // ENCODER_MAP_ENABLE
diff --git a/keyboards/handwired/swiftrax/bumblebee/bumblebee.c b/keyboards/handwired/swiftrax/bumblebee/bumblebee.c
index 1199b90b1f..9c3444955c 100644
--- a/keyboards/handwired/swiftrax/bumblebee/bumblebee.c
+++ b/keyboards/handwired/swiftrax/bumblebee/bumblebee.c
@@ -16,17 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bumblebee.h"
-// Encoder
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise))
- return false;
- if (clockwise)
- tap_code(KC_VOLU);
- else
- tap_code(KC_VOLD);
- return true;
-}
-
// Initialize all RGB indicators to 'off'
void keyboard_post_init_kb(void) {
rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED
diff --git a/keyboards/handwired/swiftrax/digicarp65/digicarp65.c b/keyboards/handwired/swiftrax/digicarp65/digicarp65.c
index 99823a756c..4e5413cc14 100644
--- a/keyboards/handwired/swiftrax/digicarp65/digicarp65.c
+++ b/keyboards/handwired/swiftrax/digicarp65/digicarp65.c
@@ -15,17 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "digicarp65.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/handwired/tsubasa/tsubasa.c b/keyboards/handwired/tsubasa/tsubasa.c
index 5ae19c185a..78d27b57a8 100644
--- a/keyboards/handwired/tsubasa/tsubasa.c
+++ b/keyboards/handwired/tsubasa/tsubasa.c
@@ -16,20 +16,6 @@
#include "tsubasa.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
static void render_scrl(void) {
static const char PROGMEM raw_scrl[] = {
diff --git a/keyboards/io_mini1800/io_mini1800.c b/keyboards/io_mini1800/io_mini1800.c
index aa500c469a..7f148a3927 100644
--- a/keyboards/io_mini1800/io_mini1800.c
+++ b/keyboards/io_mini1800/io_mini1800.c
@@ -2,17 +2,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "io_mini1800.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/jagdpietr/drakon/drakon.c b/keyboards/jagdpietr/drakon/drakon.c
index 65d9503055..59b7a4fba5 100644
--- a/keyboards/jagdpietr/drakon/drakon.c
+++ b/keyboards/jagdpietr/drakon/drakon.c
@@ -18,16 +18,6 @@
char wpm_str[10];
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-
#ifdef OLED_ENABLE
// Defines names for use in layer keycodes and the keymap
diff --git a/keyboards/jkeys_design/gentleman65/gentleman65.c b/keyboards/jkeys_design/gentleman65/gentleman65.c
index 9e9baa011e..8d2af0e150 100644
--- a/keyboards/jkeys_design/gentleman65/gentleman65.c
+++ b/keyboards/jkeys_design/gentleman65/gentleman65.c
@@ -16,15 +16,3 @@
*/
#include "gentleman65.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code_delay(KC_AUDIO_VOL_UP, 10);
- } else {
- tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
- }
- }
- return true;
-} \ No newline at end of file
diff --git a/keyboards/jkeys_design/gentleman65_se_s/gentleman65_se_s.c b/keyboards/jkeys_design/gentleman65_se_s/gentleman65_se_s.c
index 1b6133cf2a..2649707215 100644
--- a/keyboards/jkeys_design/gentleman65_se_s/gentleman65_se_s.c
+++ b/keyboards/jkeys_design/gentleman65_se_s/gentleman65_se_s.c
@@ -16,17 +16,3 @@
*/
#include "gentleman65_se_s.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code_delay(KC_AUDIO_VOL_UP, 10);
- } else {
- tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/kapcave/arya/arya.c b/keyboards/kapcave/arya/arya.c
index af5d19be4f..13cae06189 100644
--- a/keyboards/kapcave/arya/arya.c
+++ b/keyboards/kapcave/arya/arya.c
@@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "arya.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/keebio/dsp40/rev1/rev1.c b/keyboards/keebio/dsp40/rev1/rev1.c
index dbaea8d4cc..091cfc1523 100644
--- a/keyboards/keebio/dsp40/rev1/rev1.c
+++ b/keyboards/keebio/dsp40/rev1/rev1.c
@@ -24,15 +24,3 @@ void eeconfig_init_kb(void) {
eeconfig_update_kb(0);
eeconfig_init_user();
}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return false;
-}
diff --git a/keyboards/keebsforall/coarse60/coarse60.c b/keyboards/keebsforall/coarse60/coarse60.c
index 8287eec1a8..a609a09588 100644
--- a/keyboards/keebsforall/coarse60/coarse60.c
+++ b/keyboards/keebsforall/coarse60/coarse60.c
@@ -15,15 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "coarse60.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/keebsforall/freebirdnp/pro/pro.c b/keyboards/keebsforall/freebirdnp/pro/pro.c
deleted file mode 100644
index b98dfd6082..0000000000
--- a/keyboards/keebsforall/freebirdnp/pro/pro.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2021 Elliot Powell
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return false;
-}
diff --git a/keyboards/keychron/v10/v10.c b/keyboards/keychron/v10/v10.c
index 091c2e9a4b..2e1e3f090f 100644
--- a/keyboards/keychron/v10/v10.c
+++ b/keyboards/keychron/v10/v10.c
@@ -84,17 +84,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
}
#endif // CAPS_LOCK_LED_INDEX
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/keychron/v6/v6.c b/keyboards/keychron/v6/v6.c
index 02708e7bc1..0f9305d2d0 100644
--- a/keyboards/keychron/v6/v6.c
+++ b/keyboards/keychron/v6/v6.c
@@ -98,17 +98,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
}
#endif // RGB_MATRIX_ENABLE...
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/keyprez/rhino/rhino.c b/keyboards/keyprez/rhino/rhino.c
index fa0ae901c9..d2e1bf2e23 100644
--- a/keyboards/keyprez/rhino/rhino.c
+++ b/keyboards/keyprez/rhino/rhino.c
@@ -17,12 +17,6 @@
#include "quantum.h"
#include QMK_KEYBOARD_H
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- tap_code(clockwise ? KC_VOLU : KC_VOLD);
- return true;
-}
-
__attribute__ ((weak))
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_2x2u(
0,
diff --git a/keyboards/keyprez/unicorn/unicorn.c b/keyboards/keyprez/unicorn/unicorn.c
index 0ddd49658b..213ed629ac 100644
--- a/keyboards/keyprez/unicorn/unicorn.c
+++ b/keyboards/keyprez/unicorn/unicorn.c
@@ -2,17 +2,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "unicorn.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/keystonecaps/gameroyadvance/gameroyadvance.c b/keyboards/keystonecaps/gameroyadvance/gameroyadvance.c
index 797f4dba76..70c49ce118 100644
--- a/keyboards/keystonecaps/gameroyadvance/gameroyadvance.c
+++ b/keyboards/keystonecaps/gameroyadvance/gameroyadvance.c
@@ -16,31 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gameroyadvance.h"
-
-
-
-#ifdef ENCODER_ENABLE
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
-
- if (!encoder_update_user(index, clockwise)) { return false; }
-
- if (index == 0) {
-
- if (clockwise) {
-
- tap_code_delay(KC_VOLU, 10);
-
- } else {
-
- tap_code_delay(KC_VOLD, 10);
-
- }
-
- }
-
- return true;
-
-}
-
-#endif
diff --git a/keyboards/kiwikeebs/macro/macro.c b/keyboards/kiwikeebs/macro/macro.c
index 5eb03509e5..cc854cf139 100644
--- a/keyboards/kiwikeebs/macro/macro.c
+++ b/keyboards/kiwikeebs/macro/macro.c
@@ -15,15 +15,3 @@
*/
#include "macro.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_AUDIO_VOL_UP);
- } else {
- tap_code(KC_AUDIO_VOL_DOWN);
- }
- }
- return true;
-}
diff --git a/keyboards/kiwikeebs/macro_v2/macro_v2.c b/keyboards/kiwikeebs/macro_v2/macro_v2.c
index 795da21cc9..dd921f290f 100644
--- a/keyboards/kiwikeebs/macro_v2/macro_v2.c
+++ b/keyboards/kiwikeebs/macro_v2/macro_v2.c
@@ -15,15 +15,3 @@
*/
#include "macro_v2.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_AUDIO_VOL_UP);
- } else {
- tap_code(KC_AUDIO_VOL_DOWN);
- }
- }
- return true;
-}
diff --git a/keyboards/kiwikey/borderland/borderland.c b/keyboards/kiwikey/borderland/borderland.c
index 660e8026fc..371dc73098 100644
--- a/keyboards/kiwikey/borderland/borderland.c
+++ b/keyboards/kiwikey/borderland/borderland.c
@@ -2,17 +2,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "borderland.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c
index 9f7333b721..499edf6e5f 100644
--- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c
+++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c
@@ -57,17 +57,3 @@ bool rgb_matrix_indicators_kb(void) {
}
return true;
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
index 6cb40e0622..001debe128 100644
--- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
@@ -127,17 +127,3 @@ bool rgb_matrix_indicators_kb(void) {
return true;
}
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/latincompass/latinpadble/latinpadble.c b/keyboards/latincompass/latinpadble/latinpadble.c
index cce96241b6..a6cd6784e1 100644
--- a/keyboards/latincompass/latinpadble/latinpadble.c
+++ b/keyboards/latincompass/latinpadble/latinpadble.c
@@ -14,13 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "latinpadble.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- return true;
-}
diff --git a/keyboards/ll3macorn/bongopad/bongopad.c b/keyboards/ll3macorn/bongopad/bongopad.c
index 42a8a199cb..a53c7e9fbe 100644
--- a/keyboards/ll3macorn/bongopad/bongopad.c
+++ b/keyboards/ll3macorn/bongopad/bongopad.c
@@ -2,22 +2,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "bongopad.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- // rest fo the code
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
if (!oled_task_user()) {
diff --git a/keyboards/lpad/lpad.c b/keyboards/lpad/lpad.c
deleted file mode 100644
index 214dd2e390..0000000000
--- a/keyboards/lpad/lpad.c
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2023 Laneware Peripherals
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/lw67/lw67.c b/keyboards/lw67/lw67.c
index 87eaa1671e..87f69e9df5 100644
--- a/keyboards/lw67/lw67.c
+++ b/keyboards/lw67/lw67.c
@@ -15,16 +15,3 @@
*/
#include "lw67.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return false;
-}
-
diff --git a/keyboards/lw75/lw75.c b/keyboards/lw75/lw75.c
index 110a26ce1a..1ec6841515 100644
--- a/keyboards/lw75/lw75.c
+++ b/keyboards/lw75/lw75.c
@@ -2,18 +2,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "lw75.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
-#endif
-
diff --git a/keyboards/lyso1/lck75/lck75.c b/keyboards/lyso1/lck75/lck75.c
index 55650681ac..edaaf3feb1 100644
--- a/keyboards/lyso1/lck75/lck75.c
+++ b/keyboards/lyso1/lck75/lck75.c
@@ -14,18 +14,6 @@
*/
#include "lck75.h"
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
-
#define IDLE_FRAMES 5
#define IDLE_SPEED 30
#define TAP_FRAMES 2
diff --git a/keyboards/macro1/macro1.c b/keyboards/macro1/macro1.c
index f1fbed1d15..a9cba4ecfa 100644
--- a/keyboards/macro1/macro1.c
+++ b/keyboards/macro1/macro1.c
@@ -14,18 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "macro1.h"
-
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return false;
-}
diff --git a/keyboards/mechwild/bde/rev2/rev2.c b/keyboards/mechwild/bde/rev2/rev2.c
index d89f2f1938..3d83144024 100644
--- a/keyboards/mechwild/bde/rev2/rev2.c
+++ b/keyboards/mechwild/bde/rev2/rev2.c
@@ -16,22 +16,6 @@
#include "quantum.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
static const char PROGMEM mw_logo[] = {
0x8A, 0x8B, 0x8C, 0x8D, '\r',
diff --git a/keyboards/mechwild/mercutio/mercutio.c b/keyboards/mechwild/mercutio/mercutio.c
index 890bf869de..c0369397d1 100755
--- a/keyboards/mechwild/mercutio/mercutio.c
+++ b/keyboards/mechwild/mercutio/mercutio.c
@@ -17,25 +17,6 @@
#include "mercutio.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if(!encoder_update_user(index, clockwise)) {
- return false;
- }
-
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
static const char PROGMEM mercutio_name[] = {
0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
diff --git a/keyboards/mechwild/obe/obe.c b/keyboards/mechwild/obe/obe.c
index 195d4a7679..548f955825 100644
--- a/keyboards/mechwild/obe/obe.c
+++ b/keyboards/mechwild/obe/obe.c
@@ -15,19 +15,3 @@
*/
#include "obe.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
diff --git a/keyboards/mechwild/waka60/waka60.c b/keyboards/mechwild/waka60/waka60.c
index 180d0a6786..f0c5f143e4 100644
--- a/keyboards/mechwild/waka60/waka60.c
+++ b/keyboards/mechwild/waka60/waka60.c
@@ -15,19 +15,3 @@
*/
#include "waka60.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c
index 7e8c6511bb..11f49a9060 100644
--- a/keyboards/meletrix/zoom65/zoom65.c
+++ b/keyboards/meletrix/zoom65/zoom65.c
@@ -61,10 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise)
encoder_action_register(index, clockwise);
return true;
};
-#else
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10);
- return true;
-}
#endif
diff --git a/keyboards/meletrix/zoom65_lite/zoom65_lite.c b/keyboards/meletrix/zoom65_lite/zoom65_lite.c
index 1e1100a207..b0b511f686 100644
--- a/keyboards/meletrix/zoom65_lite/zoom65_lite.c
+++ b/keyboards/meletrix/zoom65_lite/zoom65_lite.c
@@ -15,11 +15,3 @@
*/
#include "zoom65_lite.h"
-
-#ifndef VIA_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10);
- return true;
-}
-#endif
diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c
index ff50851247..f21c0daa07 100644
--- a/keyboards/metamechs/timberwolf/timberwolf.c
+++ b/keyboards/metamechs/timberwolf/timberwolf.c
@@ -23,13 +23,3 @@ void led_update_ports(led_t led_state) {
backlight_set(0);
}
}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/mini_elixivy/mini_elixivy.c b/keyboards/mini_elixivy/mini_elixivy.c
index a8d9c931c2..2d6f1ea623 100644
--- a/keyboards/mini_elixivy/mini_elixivy.c
+++ b/keyboards/mini_elixivy/mini_elixivy.c
@@ -15,14 +15,3 @@
*/
#include "mini_elixivy.h"
-
-/* Rotary Encoder's function (currently volume up/down) */
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/mk65/mk65.c b/keyboards/mk65/mk65.c
deleted file mode 100644
index b05174eacd..0000000000
--- a/keyboards/mk65/mk65.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2022 DeskDaily
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/mwstudio/alicekk/alicekk.c b/keyboards/mwstudio/alicekk/alicekk.c
index 96c468066a..e8ab40b2b9 100644
--- a/keyboards/mwstudio/alicekk/alicekk.c
+++ b/keyboards/mwstudio/alicekk/alicekk.c
@@ -14,17 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "alicekk.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/mwstudio/mw80/mw80.c b/keyboards/mwstudio/mw80/mw80.c
deleted file mode 100644
index e402f305ec..0000000000
--- a/keyboards/mwstudio/mw80/mw80.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2022 TW59420 <https://github.com/TW59420>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/nullbitsco/snap/snap.c b/keyboards/nullbitsco/snap/snap.c
index 1ec6e5cf00..c1005bc623 100644
--- a/keyboards/nullbitsco/snap/snap.c
+++ b/keyboards/nullbitsco/snap/snap.c
@@ -111,17 +111,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/onekeyco/dango40/dango40.c b/keyboards/onekeyco/dango40/dango40.c
index 8ca77545bf..2df82b0aa1 100644
--- a/keyboards/onekeyco/dango40/dango40.c
+++ b/keyboards/onekeyco/dango40/dango40.c
@@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dango40.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
diff --git a/keyboards/orthocode/orthocode.c b/keyboards/orthocode/orthocode.c
index 8ddd32c396..1bfc431c78 100644
--- a/keyboards/orthocode/orthocode.c
+++ b/keyboards/orthocode/orthocode.c
@@ -44,16 +44,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- // Volume control
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-#endif
diff --git a/keyboards/pauperboards/brick/brick.c b/keyboards/pauperboards/brick/brick.c
deleted file mode 100644
index 13df995e54..0000000000
--- a/keyboards/pauperboards/brick/brick.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2023 Jason Chestnut <pauperboards@gmail.com> @pauperboards
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
-#endif
diff --git a/keyboards/pearlboards/atlas/atlas.c b/keyboards/pearlboards/atlas/atlas.c
index ff8577bde1..d8fcc8abb9 100644
--- a/keyboards/pearlboards/atlas/atlas.c
+++ b/keyboards/pearlboards/atlas/atlas.c
@@ -15,17 +15,3 @@
*/
#include "atlas.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/pearlboards/pandora/pandora.c b/keyboards/pearlboards/pandora/pandora.c
index 608ee00edf..927f29f2f3 100644
--- a/keyboards/pearlboards/pandora/pandora.c
+++ b/keyboards/pearlboards/pandora/pandora.c
@@ -16,24 +16,6 @@
#include "pandora.h"
-// Encoder rotate function
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- /* First encoder */
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_AUDIO_VOL_UP);
- } else {
- tap_code(KC_AUDIO_VOL_DOWN);
- }
- }
- return true;
-}
-#endif
-
// Encoder click function
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/pearlboards/zeus/zeus.c b/keyboards/pearlboards/zeus/zeus.c
index cdb8d6125d..b6a7fe1f8e 100644
--- a/keyboards/pearlboards/zeus/zeus.c
+++ b/keyboards/pearlboards/zeus/zeus.c
@@ -15,20 +15,3 @@
*/
#include "zeus.h"
-
-// Encoder rotate function
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- } /* First encoder */
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_AUDIO_VOL_UP);
- } else {
- tap_code(KC_AUDIO_VOL_DOWN);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/pearlboards/zeuspad/zeuspad.c b/keyboards/pearlboards/zeuspad/zeuspad.c
index 3f7367fb49..ffa504fa63 100644
--- a/keyboards/pearlboards/zeuspad/zeuspad.c
+++ b/keyboards/pearlboards/zeuspad/zeuspad.c
@@ -16,24 +16,6 @@
#include "zeuspad.h"
-// Encoder rotate function
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- /* First encoder */
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_AUDIO_VOL_UP, 10);
- } else {
- tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
- }
- }
- return true;
-}
-#endif
-
// 21 characters max
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
diff --git a/keyboards/pica40/rev1/rev1.c b/keyboards/pica40/rev1/rev1.c
index f008e4857a..f8a03dde3b 100644
--- a/keyboards/pica40/rev1/rev1.c
+++ b/keyboards/pica40/rev1/rev1.c
@@ -77,15 +77,3 @@ bool oled_task_kb(void) {
}
#endif // OLED_ENABLE
-
-#ifdef ENCODER_ENABLE
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
-
- tap_code(clockwise ? KC_VOLU : KC_VOLD);
-
- return false;
-}
-
-#endif // ENCODER_ENABLE
diff --git a/keyboards/program_yoink/program_yoink.c b/keyboards/program_yoink/program_yoink.c
deleted file mode 100644
index d1373a5283..0000000000
--- a/keyboards/program_yoink/program_yoink.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2020 melonbred
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/rart/rart75hs/rart75hs.c b/keyboards/rart/rart75hs/rart75hs.c
index 6c1c408a8b..58f43c87e3 100644
--- a/keyboards/rart/rart75hs/rart75hs.c
+++ b/keyboards/rart/rart75hs/rart75hs.c
@@ -13,19 +13,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rart75hs.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/rart/rart75m/rart75m.c b/keyboards/rart/rart75m/rart75m.c
index 87a12a9a1f..7c9014386e 100644
--- a/keyboards/rart/rart75m/rart75m.c
+++ b/keyboards/rart/rart75m/rart75m.c
@@ -14,22 +14,6 @@
*/
#include "rart75m.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
if (!oled_task_user()) {
diff --git a/keyboards/rart/rartland/rartland.c b/keyboards/rart/rartland/rartland.c
index e4a555d128..da4be6ac8c 100644
--- a/keyboards/rart/rartland/rartland.c
+++ b/keyboards/rart/rartland/rartland.c
@@ -14,22 +14,6 @@
*/
#include "rartland.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
if (!oled_task_user()) {
diff --git a/keyboards/reedskeebs/alish40/alish40.c b/keyboards/reedskeebs/alish40/alish40.c
deleted file mode 100644
index 685eae8de8..0000000000
--- a/keyboards/reedskeebs/alish40/alish40.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2023 QMK Contributors (@qmk)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- switch (index) {
- case 0:
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- break;
- }
- return true;
-}
-#endif
diff --git a/keyboards/ristretto/ristretto.c b/keyboards/ristretto/ristretto.c
index b73e5043c3..d004b3dffe 100644
--- a/keyboards/ristretto/ristretto.c
+++ b/keyboards/ristretto/ristretto.c
@@ -23,18 +23,6 @@ enum layers {
_ADJUST
};
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if(index == 0) {
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- }
- return true;
-}
-
#ifdef OLED_ENABLE
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_270;
diff --git a/keyboards/rmkeebs/rm_numpad/rm_numpad.c b/keyboards/rmkeebs/rm_numpad/rm_numpad.c
deleted file mode 100644
index 0152566bd1..0000000000
--- a/keyboards/rmkeebs/rm_numpad/rm_numpad.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2021 RuckerMachine
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/rotr/rotr.c b/keyboards/rotr/rotr.c
index b7c551075d..8df10909f6 100644
--- a/keyboards/rotr/rotr.c
+++ b/keyboards/rotr/rotr.c
@@ -1,11 +1 @@
#include "rotr.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- return true;
-}
diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c
index 50e5fcf782..b125ff34a5 100644
--- a/keyboards/rubi/rubi.c
+++ b/keyboards/rubi/rubi.c
@@ -72,8 +72,3 @@ bool led_update_kb(led_t led_state) {
}
return true;
}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- return true;
-}
diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c
index 8fd9a2fa14..824e7364be 100644
--- a/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c
+++ b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c
@@ -15,17 +15,3 @@
*/
#include "hotswap.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif \ No newline at end of file
diff --git a/keyboards/sneakbox/aliceclonergb/aliceclonergb.c b/keyboards/sneakbox/aliceclonergb/aliceclonergb.c
index e2136312d3..62d0118cf9 100644
--- a/keyboards/sneakbox/aliceclonergb/aliceclonergb.c
+++ b/keyboards/sneakbox/aliceclonergb/aliceclonergb.c
@@ -16,17 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "aliceclonergb.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index,clockwise)) { return false; }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_DOWN);
- } else {
- tap_code(KC_UP);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/spacey/spacey.c b/keyboards/spacey/spacey.c
index 32f1e4dd9c..a83f1f8990 100644
--- a/keyboards/spacey/spacey.c
+++ b/keyboards/spacey/spacey.c
@@ -15,15 +15,3 @@
*/
#include "spacey.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise){
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if(clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- }
- return true;
-}
diff --git a/keyboards/sthlmkb/litl/litl.c b/keyboards/sthlmkb/litl/litl.c
index 40aedfbe27..230d4db52a 100644
--- a/keyboards/sthlmkb/litl/litl.c
+++ b/keyboards/sthlmkb/litl/litl.c
@@ -14,17 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "litl.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/taleguers/taleguers75/taleguers75.c b/keyboards/taleguers/taleguers75/taleguers75.c
index 97664effde..b51d9443bc 100644
--- a/keyboards/taleguers/taleguers75/taleguers75.c
+++ b/keyboards/taleguers/taleguers75/taleguers75.c
@@ -15,14 +15,3 @@
*/
#include "taleguers75.h"
-
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (!clockwise) {
- tap_code(KC_AUDIO_VOL_DOWN);
- } else {
- tap_code(KC_AUDIO_VOL_UP);
- }
- return true;
-}
diff --git a/keyboards/tau4/tau4.c b/keyboards/tau4/tau4.c
index aa508aae2c..c93d73f2b4 100644
--- a/keyboards/tau4/tau4.c
+++ b/keyboards/tau4/tau4.c
@@ -17,20 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
bool oled_task_kb(void) {
if (!oled_task_user()) { return false; }
diff --git a/keyboards/thepanduuh/degenpad/degenpad.c b/keyboards/thepanduuh/degenpad/degenpad.c
deleted file mode 100644
index e28254480e..0000000000
--- a/keyboards/thepanduuh/degenpad/degenpad.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-Copyright 2023 ThePanduuh <thepanduuh.kb@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c
index 299af2f305..568f75901f 100644
--- a/keyboards/tkc/portico75/portico75.c
+++ b/keyboards/tkc/portico75/portico75.c
@@ -171,19 +171,3 @@ bool rgb_matrix_indicators_kb(void) {
return true;
}
#endif
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif
diff --git a/keyboards/tominabox1/bigboy/bigboy.c b/keyboards/tominabox1/bigboy/bigboy.c
deleted file mode 100755
index 6871d81a62..0000000000
--- a/keyboards/tominabox1/bigboy/bigboy.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2022 tominabox1
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (index == 0) {
- if (clockwise) {
- tap_code_delay(KC_VOLU, 10);
- } else {
- tap_code_delay(KC_VOLD, 10);
- }
- }
- return true;
-}
-#endif /* ENCODER_ENABLE */
diff --git a/keyboards/ungodly/nines/nines.c b/keyboards/ungodly/nines/nines.c
deleted file mode 100644
index bfb3bb889d..0000000000
--- a/keyboards/ungodly/nines/nines.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 2020 Ungodly Design <hello@ungodly.design>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- #include "quantum.h"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) return false;
- if (index == 0) { /* Left encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- } else if (index == 1) { /* Right encoder */
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- return true;
-}
diff --git a/keyboards/viendi8l/viendi8l.c b/keyboards/viendi8l/viendi8l.c
index 6d52993342..4d0257f0dd 100644
--- a/keyboards/viendi8l/viendi8l.c
+++ b/keyboards/viendi8l/viendi8l.c
@@ -39,14 +39,3 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
}
return state;
}
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if(!encoder_update_user(index, clockwise)) return false;
- if (index == 0) {
- if (clockwise) tap_code_delay(KC_VOLU, 10);
- else tap_code_delay(KC_VOLD, 10);
- }
- return true;
-}
-#endif
diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c
index 928a8abd89..157504216d 100644
--- a/keyboards/work_louder/work_board/work_board.c
+++ b/keyboards/work_louder/work_board/work_board.c
@@ -16,20 +16,6 @@
#include "work_board.h"
-#if defined(ENCODER_ENABLE)
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
- return false;
- }
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- return true;
-}
-#endif
-
#ifdef OLED_ENABLE
# ifdef RGB_MATRIX_ENABLE
# error Cannot run OLED and Per Key RGB at the same time due to pin conflicts
diff --git a/keyboards/wuque/mammoth75x/mammoth75x.c b/keyboards/wuque/mammoth75x/mammoth75x.c
index 9452195752..21dcf1e67d 100644
--- a/keyboards/wuque/mammoth75x/mammoth75x.c
+++ b/keyboards/wuque/mammoth75x/mammoth75x.c
@@ -61,10 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise)
encoder_action_register(index, clockwise);
return true;
};
-#else
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10);
- return true;
-}
#endif
diff --git a/keyboards/wuque/serneity65/serneity65.c b/keyboards/wuque/serneity65/serneity65.c
index ff03a3ca5f..9bc4ab28af 100644
--- a/keyboards/wuque/serneity65/serneity65.c
+++ b/keyboards/wuque/serneity65/serneity65.c
@@ -61,15 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise)
encoder_action_register(index, clockwise);
return true;
};
-#else
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- }
- return true;
-}
#endif
diff --git a/keyboards/z12/z12.c b/keyboards/z12/z12.c
deleted file mode 100644
index 3edc9128e4..0000000000
--- a/keyboards/z12/z12.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 Sergi Meseguer <zigotica@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-#ifdef ENCODER_ENABLE
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- return encoder_update_user(index, clockwise);
-}
-#endif
diff --git a/quantum/encoder.c b/quantum/encoder.c
index 8053913e8d..1046fe6cc3 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -77,7 +77,29 @@ __attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) {
}
__attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) {
- return encoder_update_user(index, clockwise);
+ bool res = encoder_update_user(index, clockwise);
+#if !defined(ENCODER_TESTS)
+ if (res) {
+ if (clockwise) {
+# if defined(EXTRAKEY_ENABLE)
+ tap_code_delay(KC_VOLU, 10);
+# elif defined(MOUSEKEY_ENABLE)
+ tap_code_delay(KC_MS_WH_UP, 10);
+# else
+ tap_code_delay(KC_PGDN, 10);
+# endif
+ } else {
+# if defined(EXTRAKEY_ENABLE)
+ tap_code_delay(KC_VOLD, 10);
+# elif defined(MOUSEKEY_ENABLE)
+ tap_code_delay(KC_MS_WH_DOWN, 10);
+# else
+ tap_code_delay(KC_PGUP, 10);
+# endif
+ }
+ }
+#endif // ENCODER_TESTS
+ return res;
}
__attribute__((weak)) bool should_process_encoder(void) {