summaryrefslogtreecommitdiffstats
path: root/docs/ja/feature_encoders.md
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-24 00:37:19 -0700
committerGitHub <noreply@github.com>2021-07-24 00:37:19 -0700
commitb8a1e14f53489eea63bd747d1b94d7d9b7da5ac9 (patch)
tree962a82138ba7db677d9ee90e4de44053bdddb017 /docs/ja/feature_encoders.md
parent73d4d7dc2bcad7ed7e4d3bdb33aacc18c374c8a9 (diff)
Remove deprecated callbacks for encoders and dip switches (#13404)
Diffstat (limited to 'docs/ja/feature_encoders.md')
-rw-r--r--docs/ja/feature_encoders.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md
index 7b7f394c83..21f42d38b7 100644
--- a/docs/ja/feature_encoders.md
+++ b/docs/ja/feature_encoders.md
@@ -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;
}
```