Skip to content

Commit

Permalink
Enable encoder map on navpad1.0 (qmk#22266)
Browse files Browse the repository at this point in the history
  • Loading branch information
MakotoKurauchi authored and Nathan committed Feb 11, 2024
1 parent 67ea5fc commit f661fe8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 7 additions & 11 deletions keyboards/yushakobo/navpad/10/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};

#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code16(KC_WH_U);
} else {
tap_code16(KC_WH_D);
}
}
return false;
}
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_BASE] = { ENCODER_CCW_CW(KC_WH_U, KC_WH_D) },
[_FN1] = { ENCODER_CCW_CW(KC_NO, KC_NO) },
[_FN2] = { ENCODER_CCW_CW(KC_NO, KC_NO) },
[_FN3] = { ENCODER_CCW_CW(KC_NO, KC_NO) },
};
#endif

#ifdef RGBLIGHT_LAYERS
Expand Down
3 changes: 2 additions & 1 deletion keyboards/yushakobo/navpad/10/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes
VIA_ENABLE = yes

0 comments on commit f661fe8

Please sign in to comment.