diff options
Diffstat (limited to 'docs/ja/feature_encoders.md')
| -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 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;  }  ``` | 
