Remove deprecated callbacks for encoders and dip switches (#13404)

This commit is contained in:
Drashna Jaelre
2021-07-24 00:37:19 -07:00
committed by GitHub
parent 73d4d7dc2b
commit b8a1e14f53
59 changed files with 338 additions and 458 deletions

View File

@ -51,15 +51,18 @@ ENCODER_ENABLE = yes
コールバック関数を `<keyboard>.c` に記述することができます:
```c
void encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise);
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
}
```
あるいは `keymap.c` に記述することもできます:
```c
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
return true;
}
```