diff --git a/lily58/config.h b/lily58/config.h
index b5ac9c4..a43af0a 100644
--- a/lily58/config.h
+++ b/lily58/config.h
@@ -23,20 +23,18 @@ along with this program. If not, see .
/* Select hand configuration */
-//#define MASTER_LEFT
-//#define MASTER_RIGHT
+// #define MASTER_LEFT
+// #define MASTER_RIGHT
#define EE_HANDS
-#define USE_SERIAL_PD2
-
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 100
/* Encoder support */
#define ENCODERS_PAD_A { F5 }
#define ENCODERS_PAD_B { F4 }
-#define ENCODER_RESOLUTION 2
#define ENCODERS_PAD_A_RIGHT { F4 }
#define ENCODERS_PAD_B_RIGHT { F5 }
+#define ENCODER_RESOLUTION 4
#define ENCODER_DIRECTION_RIGHT 4
#define ENCODER_DIRECTION_FLIP
diff --git a/lily58/keymap.c b/lily58/keymap.c
index b00b4c8..8440cb5 100644
--- a/lily58/keymap.c
+++ b/lily58/keymap.c
@@ -68,37 +68,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-// encoder functionality modified from https://github.com/ergohaven/qmk_firmware/blob/master/keyboards/lily58/keymaps/eh/keymap.c
-/* Copyright 2020 Naoki Katahira
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see .
-*/
-#ifdef ENCODER_ENABLE
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_WH_D);
- } else {
- tap_code(KC_WH_U);
- }
- } else if (index == 1) { /* Second encoder */
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- }
- return true;
-}
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [_LOWER] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS ), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+};
#endif
diff --git a/lily58/rules.mk b/lily58/rules.mk
index 3d5a879..804ff03 100644
--- a/lily58/rules.mk
+++ b/lily58/rules.mk
@@ -1,3 +1,5 @@
ENCODER_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
EXTRAFLAGS += -flto
\ No newline at end of file