Enable encoder map on navpad1.0 (#22266)

This commit is contained in:
MakotoKurauchi 2023-10-14 13:30:25 +09:00 committed by GitHub
parent 62ff02a101
commit a46c7abd01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 12 deletions

View file

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

View file

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