diff options
author | Drashna Jaelre <drashna@live.com> | 2021-07-24 00:37:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 00:37:19 -0700 |
commit | b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9 (patch) | |
tree | 962a82138ba7db677d9ee90e4de44053bdddb017 /docs/ja | |
parent | 73d4d7dc2bcad7ed7e4d3bdb33aacc18c374c8a9 (diff) | |
download | qmk_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.md | 10 |
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 |
54 | void encoder_update_kb(uint8_t index, bool clockwise) { | 54 | bool 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 |
62 | void encoder_update_user(uint8_t index, bool clockwise) { | 65 | bool 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 | ||