From 64bff411a0673598fab3c92cb82ca07ebbf8e0d1 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 28 May 2023 13:02:35 +1000 Subject: [PATCH] Encoder map: NUM_DIRECTIONS --- keyboards/fancytech/fancyalice66/keymaps/via/keymap.c | 4 ++-- keyboards/jaykeeb/sriwedari70/keymaps/via/keymap.c | 10 +++++----- keyboards/keebio/foldkb/keymaps/via/keymap.c | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/keyboards/fancytech/fancyalice66/keymaps/via/keymap.c b/keyboards/fancytech/fancyalice66/keymaps/via/keymap.c index 1d32c8f5e85d..b6b976d6ed3e 100644 --- a/keyboards/fancytech/fancyalice66/keymaps/via/keymap.c +++ b/keyboards/fancytech/fancyalice66/keymaps/via/keymap.c @@ -50,8 +50,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; -#endif \ No newline at end of file +#endif diff --git a/keyboards/jaykeeb/sriwedari70/keymaps/via/keymap.c b/keyboards/jaykeeb/sriwedari70/keymaps/via/keymap.c index cf4040c21d8f..fa11ade0342a 100644 --- a/keyboards/jaykeeb/sriwedari70/keymaps/via/keymap.c +++ b/keyboards/jaykeeb/sriwedari70/keymaps/via/keymap.c @@ -7,10 +7,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_HOME, KC_PSCR, KC_SCRL, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, - KC_PGUP, KC_PAUS, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_PGDN, KC_DEL, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_END, KC_APP, KC_UP, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), - KC_MENU, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + KC_PGUP, KC_PAUS, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_PGDN, KC_DEL, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_END, KC_APP, KC_UP, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_MENU, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), [1] = LAYOUT( @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, diff --git a/keyboards/keebio/foldkb/keymaps/via/keymap.c b/keyboards/keebio/foldkb/keymaps/via/keymap.c index 7aaface3b898..adbf93693694 100644 --- a/keyboards/keebio/foldkb/keymaps/via/keymap.c +++ b/keyboards/keebio/foldkb/keymaps/via/keymap.c @@ -14,6 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "encoder.h" #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -48,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) }, [2] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },