summaryrefslogtreecommitdiff
path: root/docs/ja/feature_encoders.md
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-08-29 08:20:25 +1000
committerNick Brassel <nick@tzarc.org>2021-08-29 08:20:25 +1000
commitf061ca497464fe85284906fb163a33eaee7a91ef (patch)
tree33ef1bfb529aed382e8526c607c4e18717f92571 /docs/ja/feature_encoders.md
parentff65185dec6f97be1eb49f17cea526a0d0bbf3d6 (diff)
parent4bad375d7c09d949a9dcdd4feba147c9c7a67ec6 (diff)
Breaking changes develop merge to master, 2021Q3 edition. (#14196)
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;
}
```