Browse Source

Enable encoder map on navpad1.0 (#22266)

pull/22272/head
MakotoKurauchi 6 months ago
committed by GitHub
parent
commit
a46c7abd01
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 12 deletions
  1. +7
    -11
      keyboards/yushakobo/navpad/10/keymaps/via/keymap.c
  2. +2
    -1
      keyboards/yushakobo/navpad/10/keymaps/via/rules.mk

+ 7
- 11
keyboards/yushakobo/navpad/10/keymaps/via/keymap.c View File

@ -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


+ 2
- 1
keyboards/yushakobo/navpad/10/keymaps/via/rules.mk View File

@ -1 +1,2 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes
VIA_ENABLE = yes

Loading…
Cancel
Save