aboutsummaryrefslogtreecommitdiff
path: root/docs/ja
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
parent73d4d7dc2bcad7ed7e4d3bdb33aacc18c374c8a9 (diff)
downloadqmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.tar.gz
qmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.zip
Remove deprecated callbacks for encoders and dip switches (#13404)
Diffstat (limited to 'docs/ja')
-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 7b7f394c8..21f42d38b 100644
--- a/docs/ja/feature_encoders.md
+++ b/docs/ja/feature_encoders.md
@@ -51,15 +51,18 @@ ENCODER_ENABLE = yes
51コールバック関数を `<keyboard>.c` に記述することができます: 51コールバック関数を `<keyboard>.c` に記述することができます:
52 52
53```c 53```c
54void encoder_update_kb(uint8_t index, bool clockwise) { 54bool encoder_update_kb(uint8_t index, bool clockwise) {
55 encoder_update_user(index, clockwise); 55 if (!encoder_update_user(index, clockwise)) {
56 return false;
57 }
58
56} 59}
57``` 60```
58 61
59あるいは `keymap.c` に記述することもできます: 62あるいは `keymap.c` に記述することもできます:
60 63
61```c 64```c
62void encoder_update_user(uint8_t index, bool clockwise) { 65bool encoder_update_user(uint8_t index, bool clockwise) {
63 if (index == 0) { /* First encoder */ 66 if (index == 0) { /* First encoder */
64 if (clockwise) { 67 if (clockwise) {
65 tap_code(KC_PGDN); 68 tap_code(KC_PGDN);
@@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
73 tap_code(KC_UP); 76 tap_code(KC_UP);
74 } 77 }
75 } 78 }
79 return true;
76} 80}
77``` 81```
78 82