From f3563a6b942c392aab5706ebce7c4f35235b8fd2 Mon Sep 17 00:00:00 2001 From: Laneware <68452738+Laneware@users.noreply.github.com> Date: Fri, 7 Jul 2023 21:44:14 +1000 Subject: [PATCH 1/2] Update keymap.c to add encoder --- keyboards/macro1/keymaps/default/keymap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/keyboards/macro1/keymaps/default/keymap.c b/keyboards/macro1/keymaps/default/keymap.c index 22cff4a718b0..79a2b523e5fd 100644 --- a/keyboards/macro1/keymaps/default/keymap.c +++ b/keyboards/macro1/keymaps/default/keymap.c @@ -59,6 +59,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - +#if defined(ENCODER_MAP_ENABLE) +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)}, + [2] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, + [3] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, +}; +#endif From df53d7b3715a1f5eece3821e0a8b61cf4bb77768 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 30 Aug 2023 00:54:39 +0100 Subject: [PATCH 2/2] Fix build --- keyboards/macro1/keymaps/default/keymap.c | 24 +++-------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/keyboards/macro1/keymaps/default/keymap.c b/keyboards/macro1/keymaps/default/keymap.c index 79a2b523e5fd..047ea6980857 100644 --- a/keyboards/macro1/keymaps/default/keymap.c +++ b/keyboards/macro1/keymaps/default/keymap.c @@ -41,30 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, - KC_KP_0, KC_KP_DOT), - - [1] = LAYOUT_numpad( - 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), - - [2] = LAYOUT_numpad( - 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_KP_0, KC_KP_DOT) +}; #if defined(ENCODER_MAP_ENABLE) 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)}, - [2] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, - [3] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)} }; #endif