diff options
| author | Danny <nooges@users.noreply.github.com> | 2022-02-21 13:02:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-21 18:02:30 +0000 |
| commit | 302ed624ac0910eea80ff4376dc2b8df5fd94b3f (patch) | |
| tree | 2fda098bb5384b599d4ddb4162a6cdc26951fdf4 | |
| parent | 6ad86042fedf80ed31f0696759750f2f8aa033e3 (diff) | |
| download | qmk_firmware-302ed624ac0910eea80ff4376dc2b8df5fd94b3f.tar.gz qmk_firmware-302ed624ac0910eea80ff4376dc2b8df5fd94b3f.zip | |
Add encoder defaults for Keebio boards (#16398)
* Add BDN9 encoder defaults
* Add DSP40 encoder default
* Add FoldKB encoder defaults
* Add Iris encoder defaults
* Update Iris Rev. 6 encoder orientation
* Add KBO-5000 encoder defaults
* Add Quefrency encoder defaults
* Add Sinc encoder defaults
* Add Stick encoder defaults
* Remove encoder settings from VIA keymaps
33 files changed, 298 insertions, 175 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c index e33e94b53..1dc680a1f 100644 --- a/keyboards/keebio/bdn9/keymaps/default/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c | |||
| @@ -67,5 +67,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 67 | tap_code(KC_PGUP); | 67 | tap_code(KC_PGUP); |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | return true; | 70 | return false; |
| 71 | } | 71 | } |
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c index 7c380a4fd..655f3e5ed 100644 --- a/keyboards/keebio/bdn9/keymaps/via/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c | |||
| @@ -40,28 +40,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 40 | ) | 40 | ) |
| 41 | 41 | ||
| 42 | }; | 42 | }; |
| 43 | |||
| 44 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 45 | if (index == _LEFT) { | ||
| 46 | if (clockwise) { | ||
| 47 | tap_code(KC_VOLU); | ||
| 48 | } else { | ||
| 49 | tap_code(KC_VOLD); | ||
| 50 | } | ||
| 51 | } | ||
| 52 | else if (index == _MIDDLE) { | ||
| 53 | if (clockwise) { | ||
| 54 | tap_code(KC_DOWN); | ||
| 55 | } else { | ||
| 56 | tap_code(KC_UP); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | else if (index == _RIGHT) { | ||
| 60 | if (clockwise) { | ||
| 61 | tap_code(KC_PGDN); | ||
| 62 | } else { | ||
| 63 | tap_code(KC_PGUP); | ||
| 64 | } | ||
| 65 | } | ||
| 66 | return true; | ||
| 67 | } | ||
diff --git a/keyboards/keebio/bdn9/rev1/rev1.c b/keyboards/keebio/bdn9/rev1/rev1.c index 4b32b73a0..b1b0afc60 100644 --- a/keyboards/keebio/bdn9/rev1/rev1.c +++ b/keyboards/keebio/bdn9/rev1/rev1.c | |||
| @@ -16,3 +16,29 @@ void eeconfig_init_kb(void) { | |||
| 16 | eeconfig_update_kb(0); | 16 | eeconfig_update_kb(0); |
| 17 | eeconfig_init_user(); | 17 | eeconfig_init_user(); |
| 18 | } | 18 | } |
| 19 | |||
| 20 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 21 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 22 | if (index == 0) { | ||
| 23 | if (clockwise) { | ||
| 24 | tap_code(KC_VOLU); | ||
| 25 | } else { | ||
| 26 | tap_code(KC_VOLD); | ||
| 27 | } | ||
| 28 | } | ||
| 29 | else if (index == 1) { | ||
| 30 | if (clockwise) { | ||
| 31 | tap_code(KC_DOWN); | ||
| 32 | } else { | ||
| 33 | tap_code(KC_UP); | ||
| 34 | } | ||
| 35 | } | ||
| 36 | else if (index == 2) { | ||
| 37 | if (clockwise) { | ||
| 38 | tap_code(KC_PGDN); | ||
| 39 | } else { | ||
| 40 | tap_code(KC_PGUP); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | return false; | ||
| 44 | } | ||
diff --git a/keyboards/keebio/bdn9/rev2/rev2.c b/keyboards/keebio/bdn9/rev2/rev2.c index 689abd0b1..9c2f5169f 100644 --- a/keyboards/keebio/bdn9/rev2/rev2.c +++ b/keyboards/keebio/bdn9/rev2/rev2.c | |||
| @@ -37,3 +37,29 @@ void eeconfig_init_kb(void) { | |||
| 37 | eeconfig_update_kb(0); | 37 | eeconfig_update_kb(0); |
| 38 | eeconfig_init_user(); | 38 | eeconfig_init_user(); |
| 39 | } | 39 | } |
| 40 | |||
| 41 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 42 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 43 | if (index == 0) { | ||
| 44 | if (clockwise) { | ||
| 45 | tap_code(KC_VOLU); | ||
| 46 | } else { | ||
| 47 | tap_code(KC_VOLD); | ||
| 48 | } | ||
| 49 | } | ||
| 50 | else if (index == 1) { | ||
| 51 | if (clockwise) { | ||
| 52 | tap_code(KC_DOWN); | ||
| 53 | } else { | ||
| 54 | tap_code(KC_UP); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | else if (index == 2) { | ||
| 58 | if (clockwise) { | ||
| 59 | tap_code(KC_PGDN); | ||
| 60 | } else { | ||
| 61 | tap_code(KC_PGUP); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | return false; | ||
| 65 | } | ||
diff --git a/keyboards/keebio/dsp40/keymaps/default/keymap.c b/keyboards/keebio/dsp40/keymaps/default/keymap.c index f9bf6c27c..a4f65f5f4 100755 --- a/keyboards/keebio/dsp40/keymaps/default/keymap.c +++ b/keyboards/keebio/dsp40/keymaps/default/keymap.c | |||
| @@ -113,5 +113,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 113 | tap_code(KC_VOLD); | 113 | tap_code(KC_VOLD); |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | return true; | 116 | return false; |
| 117 | } | 117 | } |
diff --git a/keyboards/keebio/dsp40/keymaps/via/keymap.c b/keyboards/keebio/dsp40/keymaps/via/keymap.c index 6575bbc8c..f2f87663c 100755 --- a/keyboards/keebio/dsp40/keymaps/via/keymap.c +++ b/keyboards/keebio/dsp40/keymaps/via/keymap.c | |||
| @@ -63,14 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 64 | ) | 64 | ) |
| 65 | }; | 65 | }; |
| 66 | |||
| 67 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 68 | if (index == 0) { | ||
| 69 | if (clockwise) { | ||
| 70 | tap_code(KC_VOLU); | ||
| 71 | } else { | ||
| 72 | tap_code(KC_VOLD); | ||
| 73 | } | ||
| 74 | } | ||
| 75 | return true; | ||
| 76 | } | ||
diff --git a/keyboards/keebio/dsp40/rev1/rev1.c b/keyboards/keebio/dsp40/rev1/rev1.c index 04c85b08d..41187b90b 100644 --- a/keyboards/keebio/dsp40/rev1/rev1.c +++ b/keyboards/keebio/dsp40/rev1/rev1.c | |||
| @@ -24,3 +24,15 @@ void eeconfig_init_kb(void) { | |||
| 24 | eeconfig_update_kb(0); | 24 | eeconfig_update_kb(0); |
| 25 | eeconfig_init_user(); | 25 | eeconfig_init_user(); |
| 26 | } | 26 | } |
| 27 | |||
| 28 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 29 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 30 | if (index == 0) { | ||
| 31 | if (clockwise) { | ||
| 32 | tap_code(KC_VOLU); | ||
| 33 | } else { | ||
| 34 | tap_code(KC_VOLD); | ||
| 35 | } | ||
| 36 | } | ||
| 37 | return false; | ||
| 38 | } | ||
diff --git a/keyboards/keebio/foldkb/keymaps/default/keymap.c b/keyboards/keebio/foldkb/keymaps/default/keymap.c index 0a71ef4d2..45bc1673e 100644 --- a/keyboards/keebio/foldkb/keymaps/default/keymap.c +++ b/keyboards/keebio/foldkb/keymaps/default/keymap.c | |||
| @@ -32,20 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 32 | KC_VOLD, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______ | 32 | KC_VOLD, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______ |
| 33 | ), | 33 | ), |
| 34 | }; | 34 | }; |
| 35 | |||
| 36 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 37 | if (index == 0) { | ||
| 38 | if (clockwise) { | ||
| 39 | tap_code(KC_VOLU); | ||
| 40 | } else { | ||
| 41 | tap_code(KC_VOLD); | ||
| 42 | } | ||
| 43 | } else if (index == 1) { | ||
| 44 | if (clockwise) { | ||
| 45 | tap_code(KC_PGDN); | ||
| 46 | } else { | ||
| 47 | tap_code(KC_PGUP); | ||
| 48 | } | ||
| 49 | } | ||
| 50 | return true; | ||
| 51 | } | ||
diff --git a/keyboards/keebio/foldkb/keymaps/via/keymap.c b/keyboards/keebio/foldkb/keymaps/via/keymap.c index d3e3a95bf..85d691276 100644 --- a/keyboards/keebio/foldkb/keymaps/via/keymap.c +++ b/keyboards/keebio/foldkb/keymaps/via/keymap.c | |||
| @@ -46,20 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 46 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 46 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 47 | ) | 47 | ) |
| 48 | }; | 48 | }; |
| 49 | |||
| 50 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 51 | if (index == 0) { | ||
| 52 | if (clockwise) { | ||
| 53 | tap_code(KC_VOLU); | ||
| 54 | } else { | ||
| 55 | tap_code(KC_VOLD); | ||
| 56 | } | ||
| 57 | } else if (index == 1) { | ||
| 58 | if (clockwise) { | ||
| 59 | tap_code(KC_PGDN); | ||
| 60 | } else { | ||
| 61 | tap_code(KC_PGUP); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | return true; | ||
| 65 | } | ||
diff --git a/keyboards/keebio/foldkb/rev1/rev1.c b/keyboards/keebio/foldkb/rev1/rev1.c index bab267400..a0dfb31b5 100644 --- a/keyboards/keebio/foldkb/rev1/rev1.c +++ b/keyboards/keebio/foldkb/rev1/rev1.c | |||
| @@ -24,3 +24,21 @@ void eeconfig_init_kb(void) { | |||
| 24 | eeconfig_update_kb(0); | 24 | eeconfig_update_kb(0); |
| 25 | eeconfig_init_user(); | 25 | eeconfig_init_user(); |
| 26 | } | 26 | } |
| 27 | |||
| 28 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 29 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 30 | if (index == 0) { | ||
| 31 | if (clockwise) { | ||
| 32 | tap_code(KC_VOLU); | ||
| 33 | } else { | ||
| 34 | tap_code(KC_VOLD); | ||
| 35 | } | ||
| 36 | } else if (index == 1) { | ||
| 37 | if (clockwise) { | ||
| 38 | tap_code(KC_PGDN); | ||
| 39 | } else { | ||
| 40 | tap_code(KC_PGUP); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | return false; | ||
| 44 | } | ||
diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index e3cd53269..169e5b50c 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c | |||
| @@ -127,5 +127,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 127 | tap_code(KC_PGUP); | 127 | tap_code(KC_PGUP); |
| 128 | } | 128 | } |
| 129 | } | 129 | } |
| 130 | return true; | 130 | return false; |
| 131 | } | 131 | } |
diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index f6183f1f7..0a71bad92 100644 --- a/keyboards/keebio/iris/keymaps/via/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c | |||
| @@ -65,21 +65,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 65 | // └────────┴────────┴────────┘ └────────┴────────┴────────┘ | 65 | // └────────┴────────┴────────┘ └────────┴────────┴────────┘ |
| 66 | ) | 66 | ) |
| 67 | }; | 67 | }; |
| 68 | |||
| 69 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 70 | if (index == 0) { | ||
| 71 | if (clockwise) { | ||
| 72 | tap_code(KC_VOLU); | ||
| 73 | } else { | ||
| 74 | tap_code(KC_VOLD); | ||
| 75 | } | ||
| 76 | } | ||
| 77 | else if (index == 1) { | ||
| 78 | if (clockwise) { | ||
| 79 | tap_code(KC_PGDN); | ||
| 80 | } else { | ||
| 81 | tap_code(KC_PGUP); | ||
| 82 | } | ||
| 83 | } | ||
| 84 | return true; | ||
| 85 | } | ||
diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index b97b097b7..e874b9bea 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c | |||
| @@ -35,3 +35,21 @@ void eeconfig_init_kb(void) { | |||
| 35 | eeconfig_update_kb(0); | 35 | eeconfig_update_kb(0); |
| 36 | eeconfig_init_user(); | 36 | eeconfig_init_user(); |
| 37 | } | 37 | } |
| 38 | |||
| 39 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 40 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 41 | if (index == 0) { | ||
| 42 | if (clockwise) { | ||
| 43 | tap_code(KC_VOLU); | ||
| 44 | } else { | ||
| 45 | tap_code(KC_VOLD); | ||
| 46 | } | ||
| 47 | } else if (index == 1) { | ||
| 48 | if (clockwise) { | ||
| 49 | tap_code(KC_PGDN); | ||
| 50 | } else { | ||
| 51 | tap_code(KC_PGUP); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | return false; | ||
| 55 | } | ||
diff --git a/keyboards/keebio/iris/rev4/rev4.c b/keyboards/keebio/iris/rev4/rev4.c index de2ba26db..36ef461cd 100644 --- a/keyboards/keebio/iris/rev4/rev4.c +++ b/keyboards/keebio/iris/rev4/rev4.c | |||
| @@ -16,3 +16,21 @@ void eeconfig_init_kb(void) { | |||
| 16 | eeconfig_update_kb(0); | 16 | eeconfig_update_kb(0); |
| 17 | eeconfig_init_user(); | 17 | eeconfig_init_user(); |
| 18 | } | 18 | } |
| 19 | |||
| 20 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 21 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 22 | if (index == 0) { | ||
| 23 | if (clockwise) { | ||
| 24 | tap_code(KC_VOLU); | ||
| 25 | } else { | ||
| 26 | tap_code(KC_VOLD); | ||
| 27 | } | ||
| 28 | } else if (index == 1) { | ||
| 29 | if (clockwise) { | ||
| 30 | tap_code(KC_PGDN); | ||
| 31 | } else { | ||
| 32 | tap_code(KC_PGUP); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | return false; | ||
| 36 | } | ||
diff --git a/keyboards/keebio/iris/rev5/rev5.c b/keyboards/keebio/iris/rev5/rev5.c index a4191719c..2a89c6923 100644 --- a/keyboards/keebio/iris/rev5/rev5.c +++ b/keyboards/keebio/iris/rev5/rev5.c | |||
| @@ -12,3 +12,21 @@ You should have received a copy of the GNU General Public License | |||
| 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 13 | */ | 13 | */ |
| 14 | #include "rev5.h" | 14 | #include "rev5.h" |
| 15 | |||
| 16 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 17 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 18 | if (index == 0) { | ||
| 19 | if (clockwise) { | ||
| 20 | tap_code(KC_VOLU); | ||
| 21 | } else { | ||
| 22 | tap_code(KC_VOLD); | ||
| 23 | } | ||
| 24 | } else if (index == 1) { | ||
| 25 | if (clockwise) { | ||
| 26 | tap_code(KC_PGDN); | ||
| 27 | } else { | ||
| 28 | tap_code(KC_PGUP); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | return false; | ||
| 32 | } | ||
diff --git a/keyboards/keebio/iris/rev6/config.h b/keyboards/keebio/iris/rev6/config.h index 386416f11..e26dc5fa5 100644 --- a/keyboards/keebio/iris/rev6/config.h +++ b/keyboards/keebio/iris/rev6/config.h | |||
| @@ -36,10 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 36 | #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } | 36 | #define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 } |
| 37 | #define SPLIT_HAND_PIN D5 | 37 | #define SPLIT_HAND_PIN D5 |
| 38 | 38 | ||
| 39 | #define ENCODERS_PAD_A { B2 } | 39 | #define ENCODERS_PAD_A { B3 } |
| 40 | #define ENCODERS_PAD_B { B3 } | 40 | #define ENCODERS_PAD_B { B2 } |
| 41 | #define ENCODERS_PAD_A_RIGHT { B2 } | 41 | #define ENCODERS_PAD_A_RIGHT { B3 } |
| 42 | #define ENCODERS_PAD_B_RIGHT { B3 } | 42 | #define ENCODERS_PAD_B_RIGHT { B2 } |
| 43 | 43 | ||
| 44 | /* COL2ROW or ROW2COL */ | 44 | /* COL2ROW or ROW2COL */ |
| 45 | #define DIODE_DIRECTION COL2ROW | 45 | #define DIODE_DIRECTION COL2ROW |
diff --git a/keyboards/keebio/iris/rev6/rev6.c b/keyboards/keebio/iris/rev6/rev6.c index ff9f9d25a..152df0b2f 100644 --- a/keyboards/keebio/iris/rev6/rev6.c +++ b/keyboards/keebio/iris/rev6/rev6.c | |||
| @@ -63,3 +63,21 @@ led_config_t g_led_config = { { | |||
| 63 | 63 | ||
| 64 | } }; | 64 | } }; |
| 65 | #endif | 65 | #endif |
| 66 | |||
| 67 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 68 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 69 | if (index == 0) { | ||
| 70 | if (clockwise) { | ||
| 71 | tap_code(KC_VOLU); | ||
| 72 | } else { | ||
| 73 | tap_code(KC_VOLD); | ||
| 74 | } | ||
| 75 | } else if (index == 1) { | ||
| 76 | if (clockwise) { | ||
| 77 | tap_code(KC_PGDN); | ||
| 78 | } else { | ||
| 79 | tap_code(KC_PGUP); | ||
| 80 | } | ||
| 81 | } | ||
| 82 | return false; | ||
| 83 | } | ||
diff --git a/keyboards/keebio/kbo5000/keymaps/default/keymap.c b/keyboards/keebio/kbo5000/keymaps/default/keymap.c index 0261d1191..d2881206d 100644 --- a/keyboards/keebio/kbo5000/keymaps/default/keymap.c +++ b/keyboards/keebio/kbo5000/keymaps/default/keymap.c | |||
| @@ -55,5 +55,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 55 | tap_code(KC_UP); | 55 | tap_code(KC_UP); |
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | return true; | 58 | return false; |
| 59 | } | 59 | } |
diff --git a/keyboards/keebio/kbo5000/keymaps/via/keymap.c b/keyboards/keebio/kbo5000/keymaps/via/keymap.c index 11075faf6..a7fd62ddd 100644 --- a/keyboards/keebio/kbo5000/keymaps/via/keymap.c +++ b/keyboards/keebio/kbo5000/keymaps/via/keymap.c | |||
| @@ -34,26 +34,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 34 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 34 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 35 | ) | 35 | ) |
| 36 | }; | 36 | }; |
| 37 | |||
| 38 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 39 | if (index == LEFT_HALF_ENC) { | ||
| 40 | if (clockwise) { | ||
| 41 | tap_code(KC_PGDN); | ||
| 42 | } else { | ||
| 43 | tap_code(KC_PGUP); | ||
| 44 | } | ||
| 45 | } else if (index == RIGHT_HALF_ENC1) { | ||
| 46 | if (clockwise) { | ||
| 47 | tap_code(KC_VOLU); | ||
| 48 | } else { | ||
| 49 | tap_code(KC_VOLD); | ||
| 50 | } | ||
| 51 | } else if (index == RIGHT_HALF_ENC2) { | ||
| 52 | if (clockwise) { | ||
| 53 | tap_code(KC_DOWN); | ||
| 54 | } else { | ||
| 55 | tap_code(KC_UP); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | return true; | ||
| 59 | } | ||
diff --git a/keyboards/keebio/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c index fafad9b6a..757a8be2a 100644 --- a/keyboards/keebio/kbo5000/rev1/rev1.c +++ b/keyboards/keebio/kbo5000/rev1/rev1.c | |||
| @@ -30,3 +30,27 @@ void eeconfig_init_kb(void) { | |||
| 30 | eeconfig_update_kb(0); | 30 | eeconfig_update_kb(0); |
| 31 | eeconfig_init_user(); | 31 | eeconfig_init_user(); |
| 32 | } | 32 | } |
| 33 | |||
| 34 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 35 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 36 | if (index == 0) { | ||
| 37 | if (clockwise) { | ||
| 38 | tap_code(KC_PGDN); | ||
| 39 | } else { | ||
| 40 | tap_code(KC_PGUP); | ||
| 41 | } | ||
| 42 | } else if (index == 1) { | ||
| 43 | if (clockwise) { | ||
| 44 | tap_code(KC_VOLU); | ||
| 45 | } else { | ||
| 46 | tap_code(KC_VOLD); | ||
| 47 | } | ||
| 48 | } else if (index == 2) { | ||
| 49 | if (clockwise) { | ||
| 50 | tap_code(KC_DOWN); | ||
| 51 | } else { | ||
| 52 | tap_code(KC_UP); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | return false; | ||
| 56 | } | ||
diff --git a/keyboards/keebio/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c index 0ae9d50e2..481de2aa0 100644 --- a/keyboards/keebio/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c | |||
| @@ -46,5 +46,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 46 | tap_code(KC_VOLD); | 46 | tap_code(KC_VOLD); |
| 47 | } | 47 | } |
| 48 | } | 48 | } |
| 49 | return true; | 49 | return false; |
| 50 | } | 50 | } |
diff --git a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c index 86f691177..f452232b2 100644 --- a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c | |||
| @@ -46,5 +46,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 46 | tap_code(KC_VOLD); | 46 | tap_code(KC_VOLD); |
| 47 | } | 47 | } |
| 48 | } | 48 | } |
| 49 | return true; | 49 | return false; |
| 50 | } | 50 | } |
diff --git a/keyboards/keebio/quefrency/keymaps/via/keymap.c b/keyboards/keebio/quefrency/keymaps/via/keymap.c index 213f7af32..5ac83ef57 100644 --- a/keyboards/keebio/quefrency/keymaps/via/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/via/keymap.c | |||
| @@ -33,20 +33,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 33 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 33 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 34 | ) | 34 | ) |
| 35 | }; | 35 | }; |
| 36 | |||
| 37 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 38 | if (index == 0) { | ||
| 39 | if (clockwise) { | ||
| 40 | tap_code(KC_PGDN); | ||
| 41 | } else { | ||
| 42 | tap_code(KC_PGUP); | ||
| 43 | } | ||
| 44 | } else if (index == 1) { | ||
| 45 | if (clockwise) { | ||
| 46 | tap_code(KC_VOLU); | ||
| 47 | } else { | ||
| 48 | tap_code(KC_VOLD); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | return true; | ||
| 52 | } | ||
diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c index 69edfd415..590c9850c 100644 --- a/keyboards/keebio/quefrency/rev2/rev2.c +++ b/keyboards/keebio/quefrency/rev2/rev2.c | |||
| @@ -30,3 +30,21 @@ void eeconfig_init_kb(void) { | |||
| 30 | eeconfig_update_kb(0); | 30 | eeconfig_update_kb(0); |
| 31 | eeconfig_init_user(); | 31 | eeconfig_init_user(); |
| 32 | } | 32 | } |
| 33 | |||
| 34 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 35 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 36 | if (index == 0) { | ||
| 37 | if (clockwise) { | ||
| 38 | tap_code(KC_PGDN); | ||
| 39 | } else { | ||
| 40 | tap_code(KC_PGUP); | ||
| 41 | } | ||
| 42 | } else if (index == 1) { | ||
| 43 | if (clockwise) { | ||
| 44 | tap_code(KC_VOLU); | ||
| 45 | } else { | ||
| 46 | tap_code(KC_VOLD); | ||
| 47 | } | ||
| 48 | } | ||
| 49 | return false; | ||
| 50 | } | ||
diff --git a/keyboards/keebio/quefrency/rev3/rev3.c b/keyboards/keebio/quefrency/rev3/rev3.c index 40771e2c6..0f8f964d9 100644 --- a/keyboards/keebio/quefrency/rev3/rev3.c +++ b/keyboards/keebio/quefrency/rev3/rev3.c | |||
| @@ -46,3 +46,21 @@ void eeconfig_init_kb(void) { | |||
| 46 | eeconfig_update_kb(0); | 46 | eeconfig_update_kb(0); |
| 47 | eeconfig_init_user(); | 47 | eeconfig_init_user(); |
| 48 | } | 48 | } |
| 49 | |||
| 50 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 51 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 52 | if (index == 0) { | ||
| 53 | if (clockwise) { | ||
| 54 | tap_code(KC_PGDN); | ||
| 55 | } else { | ||
| 56 | tap_code(KC_PGUP); | ||
| 57 | } | ||
| 58 | } else if (index == 1) { | ||
| 59 | if (clockwise) { | ||
| 60 | tap_code(KC_VOLU); | ||
| 61 | } else { | ||
| 62 | tap_code(KC_VOLD); | ||
| 63 | } | ||
| 64 | } | ||
| 65 | return false; | ||
| 66 | } | ||
diff --git a/keyboards/keebio/quefrency/rev4/rev4.c b/keyboards/keebio/quefrency/rev4/rev4.c index a66d19166..190135420 100644 --- a/keyboards/keebio/quefrency/rev4/rev4.c +++ b/keyboards/keebio/quefrency/rev4/rev4.c | |||
| @@ -15,3 +15,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "quefrency.h" | 17 | #include "quefrency.h" |
| 18 | |||
| 19 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 20 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 21 | if (index == 0) { | ||
| 22 | if (clockwise) { | ||
| 23 | tap_code(KC_PGDN); | ||
| 24 | } else { | ||
| 25 | tap_code(KC_PGUP); | ||
| 26 | } | ||
| 27 | } else if (index == 1) { | ||
| 28 | if (clockwise) { | ||
| 29 | tap_code(KC_VOLU); | ||
| 30 | } else { | ||
| 31 | tap_code(KC_VOLD); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | return false; | ||
| 35 | } | ||
diff --git a/keyboards/keebio/sinc/keymaps/default/keymap.c b/keyboards/keebio/sinc/keymaps/default/keymap.c index 650314295..060bf5dc6 100644 --- a/keyboards/keebio/sinc/keymaps/default/keymap.c +++ b/keyboards/keebio/sinc/keymaps/default/keymap.c | |||
| @@ -33,5 +33,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 33 | tap_code(KC_VOLD); | 33 | tap_code(KC_VOLD); |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | return true; | 36 | return false; |
| 37 | } | 37 | } |
diff --git a/keyboards/keebio/sinc/keymaps/via/keymap.c b/keyboards/keebio/sinc/keymaps/via/keymap.c index 20cfdd79b..225e9c07d 100644 --- a/keyboards/keebio/sinc/keymaps/via/keymap.c +++ b/keyboards/keebio/sinc/keymaps/via/keymap.c | |||
| @@ -37,20 +37,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 37 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 37 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 38 | ) | 38 | ) |
| 39 | }; | 39 | }; |
| 40 | |||
| 41 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 42 | if (index == 0) { | ||
| 43 | if (clockwise) { | ||
| 44 | tap_code(KC_PGDN); | ||
| 45 | } else { | ||
| 46 | tap_code(KC_PGUP); | ||
| 47 | } | ||
| 48 | } else if (index == 1) { | ||
| 49 | if (clockwise) { | ||
| 50 | tap_code(KC_VOLU); | ||
| 51 | } else { | ||
| 52 | tap_code(KC_VOLD); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | return true; | ||
| 56 | } | ||
diff --git a/keyboards/keebio/sinc/rev1/rev1.c b/keyboards/keebio/sinc/rev1/rev1.c index 562a24534..906b9b7d5 100644 --- a/keyboards/keebio/sinc/rev1/rev1.c +++ b/keyboards/keebio/sinc/rev1/rev1.c | |||
| @@ -22,3 +22,21 @@ void eeconfig_init_kb(void) { | |||
| 22 | eeconfig_update_kb(0); | 22 | eeconfig_update_kb(0); |
| 23 | eeconfig_init_user(); | 23 | eeconfig_init_user(); |
| 24 | } | 24 | } |
| 25 | |||
| 26 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 27 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 28 | if (index == 0) { | ||
| 29 | if (clockwise) { | ||
| 30 | tap_code(KC_PGDN); | ||
| 31 | } else { | ||
| 32 | tap_code(KC_PGUP); | ||
| 33 | } | ||
| 34 | } else if (index == 1) { | ||
| 35 | if (clockwise) { | ||
| 36 | tap_code(KC_VOLU); | ||
| 37 | } else { | ||
| 38 | tap_code(KC_VOLD); | ||
| 39 | } | ||
| 40 | } | ||
| 41 | return false; | ||
| 42 | } | ||
diff --git a/keyboards/keebio/sinc/rev2/rev2.c b/keyboards/keebio/sinc/rev2/rev2.c index aea877d83..47bb1e9e6 100644 --- a/keyboards/keebio/sinc/rev2/rev2.c +++ b/keyboards/keebio/sinc/rev2/rev2.c | |||
| @@ -38,3 +38,21 @@ void eeconfig_init_kb(void) { | |||
| 38 | eeconfig_update_kb(0); | 38 | eeconfig_update_kb(0); |
| 39 | eeconfig_init_user(); | 39 | eeconfig_init_user(); |
| 40 | } | 40 | } |
| 41 | |||
| 42 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 43 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 44 | if (index == 0) { | ||
| 45 | if (clockwise) { | ||
| 46 | tap_code(KC_PGDN); | ||
| 47 | } else { | ||
| 48 | tap_code(KC_PGUP); | ||
| 49 | } | ||
| 50 | } else if (index == 1) { | ||
| 51 | if (clockwise) { | ||
| 52 | tap_code(KC_VOLU); | ||
| 53 | } else { | ||
| 54 | tap_code(KC_VOLD); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | return false; | ||
| 58 | } | ||
diff --git a/keyboards/keebio/stick/keymaps/default/keymap.c b/keyboards/keebio/stick/keymaps/default/keymap.c index ea4ca3f54..8e9b43a14 100644 --- a/keyboards/keebio/stick/keymaps/default/keymap.c +++ b/keyboards/keebio/stick/keymaps/default/keymap.c | |||
| @@ -39,5 +39,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 39 | tap_code(KC_UP); | 39 | tap_code(KC_UP); |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | return true; | 42 | return false; |
| 43 | } | 43 | } |
diff --git a/keyboards/keebio/stick/keymaps/via/keymap.c b/keyboards/keebio/stick/keymaps/via/keymap.c index 3f196dda6..752b2de05 100644 --- a/keyboards/keebio/stick/keymaps/via/keymap.c +++ b/keyboards/keebio/stick/keymaps/via/keymap.c | |||
| @@ -35,21 +35,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 35 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 35 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 36 | ), | 36 | ), |
| 37 | }; | 37 | }; |
| 38 | |||
| 39 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 40 | if (index == 0) { | ||
| 41 | if (clockwise) { | ||
| 42 | tap_code(KC_VOLU); | ||
| 43 | } else { | ||
| 44 | tap_code(KC_VOLD); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | else if (index == 1) { | ||
| 48 | if (clockwise) { | ||
| 49 | tap_code(KC_DOWN); | ||
| 50 | } else { | ||
| 51 | tap_code(KC_UP); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | return true; | ||
| 55 | } | ||
diff --git a/keyboards/keebio/stick/stick.c b/keyboards/keebio/stick/stick.c index 050c4eff8..c2d25f886 100644 --- a/keyboards/keebio/stick/stick.c +++ b/keyboards/keebio/stick/stick.c | |||
| @@ -48,3 +48,21 @@ void eeconfig_init_kb(void) { | |||
| 48 | eeconfig_update_kb(0); | 48 | eeconfig_update_kb(0); |
| 49 | eeconfig_init_user(); | 49 | eeconfig_init_user(); |
| 50 | } | 50 | } |
| 51 | |||
| 52 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 53 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 54 | if (index == 0) { | ||
| 55 | if (clockwise) { | ||
| 56 | tap_code(KC_VOLU); | ||
| 57 | } else { | ||
| 58 | tap_code(KC_VOLD); | ||
| 59 | } | ||
| 60 | } else if (index == 1) { | ||
| 61 | if (clockwise) { | ||
| 62 | tap_code(KC_DOWN); | ||
| 63 | } else { | ||
| 64 | tap_code(KC_UP); | ||
| 65 | } | ||
| 66 | } | ||
| 67 | return false; | ||
| 68 | } | ||
