From 660dedfb176314c9a449c719b98acf9651968ce4 Mon Sep 17 00:00:00 2001 From: Less/Rikki <86894501+lesshonor@users.noreply.github.com> Date: Fri, 5 Aug 2022 21:54:22 -0400 Subject: [Keyboard] encoder map on more mechwild boards (#17894) --- keyboards/mechwild/obe/keymaps/via/keymap.c | 21 +++++++++++++++------ keyboards/mechwild/obe/keymaps/via/rules.mk | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'keyboards/mechwild/obe/keymaps/via') diff --git a/keyboards/mechwild/obe/keymaps/via/keymap.c b/keyboards/mechwild/obe/keymaps/via/keymap.c index 23b9309901..cd6dcda001 100644 --- a/keyboards/mechwild/obe/keymaps/via/keymap.c +++ b/keyboards/mechwild/obe/keymaps/via/keymap.c @@ -13,15 +13,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H // Defines names for use in layer keycodes and the keymap enum layer_names { _BASE, _FN1, - _FN2, - _FN3 + _FN2, + _FN3 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -33,21 +33,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN1] = LAYOUT( + [_FN1] = LAYOUT( KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [_FN2] = LAYOUT( + [_FN2] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [_FN3] = LAYOUT( + [_FN3] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -55,3 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; + +#ifdef ENCODER_MAP_ENABLE + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif diff --git a/keyboards/mechwild/obe/keymaps/via/rules.mk b/keyboards/mechwild/obe/keymaps/via/rules.mk index 16d33cd89f..f1adcab005 100644 --- a/keyboards/mechwild/obe/keymaps/via/rules.mk +++ b/keyboards/mechwild/obe/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes - +ENCODER_MAP_ENABLE = yes -- cgit v1.2.3