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 /keyboards/keebio/kbo5000 | |
| 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
Diffstat (limited to 'keyboards/keebio/kbo5000')
| -rw-r--r-- | keyboards/keebio/kbo5000/keymaps/default/keymap.c | 2 | ||||
| -rw-r--r-- | keyboards/keebio/kbo5000/keymaps/via/keymap.c | 23 | ||||
| -rw-r--r-- | keyboards/keebio/kbo5000/rev1/rev1.c | 24 |
3 files changed, 25 insertions, 24 deletions
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 | } | ||
