From 57440228cbe387f7a5edc87247463446fcc2dba1 Mon Sep 17 00:00:00 2001 From: Raphael Mangubat <16827478+raphkris@users.noreply.github.com> Date: Sun, 2 Apr 2023 12:23:26 -0500 Subject: [PATCH] Enable encoder mapping in VIA for Keebio KBO-5000 (#20272) --- keyboards/keebio/kbo5000/keymaps/via/keymap.c | 8 ++++++++ keyboards/keebio/kbo5000/keymaps/via/rules.mk | 1 + 2 files changed, 9 insertions(+) diff --git a/keyboards/keebio/kbo5000/keymaps/via/keymap.c b/keyboards/keebio/kbo5000/keymaps/via/keymap.c index 2a0bbe6cd313..0050229b225d 100644 --- a/keyboards/keebio/kbo5000/keymaps/via/keymap.c +++ b/keyboards/keebio/kbo5000/keymaps/via/keymap.c @@ -34,3 +34,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_UP, KC_DOWN) }, + [1] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_UP, KC_DOWN) }, + [2] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_UP, KC_DOWN) } +}; +#endif diff --git a/keyboards/keebio/kbo5000/keymaps/via/rules.mk b/keyboards/keebio/kbo5000/keymaps/via/rules.mk index 36b7ba9cbc98..aaf0497be139 100644 --- a/keyboards/keebio/kbo5000/keymaps/via/rules.mk +++ b/keyboards/keebio/kbo5000/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file