diff options
| author | Balz Guenat <balz.guenat@gmail.com> | 2021-11-20 18:06:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-20 09:06:08 -0800 |
| commit | 32215d5bff52262542a2f8d2a221b0303f02c019 (patch) | |
| tree | 4f788b0302cdda37e5f3f7165c236a3b9d85e19a /docs | |
| parent | d11d2459ce3840a4549533d1a2136044d1fa7e19 (diff) | |
| download | qmk_firmware-32215d5bff52262542a2f8d2a221b0303f02c019.tar.gz qmk_firmware-32215d5bff52262542a2f8d2a221b0303f02c019.zip | |
Rework encoders to enable asymmetric split keyboards (#12090)
Co-authored-by: Balz Guenat <balz.guenat@siemens.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/feature_encoders.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 8e854c1e5..5b6c3f163 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md | |||
| @@ -46,7 +46,9 @@ For 4× encoders you also can assign default position if encoder skips pulses wh | |||
| 46 | 46 | ||
| 47 | ## Split Keyboards | 47 | ## Split Keyboards |
| 48 | 48 | ||
| 49 | If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: | 49 | The above is enough for split keyboards that are symmetrical, i.e. the halves have the same number of encoders and they are on the same pins. |
| 50 | If the halves are not symmetrical, you can define the pinout (and optionally, resolutions) of the right half separately. | ||
| 51 | The left half will use the definitions above. | ||
| 50 | 52 | ||
| 51 | ```c | 53 | ```c |
| 52 | #define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } | 54 | #define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } |
| @@ -54,6 +56,17 @@ If you are using different pinouts for the encoders on each half of a split keyb | |||
| 54 | #define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } | 56 | #define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } |
| 55 | ``` | 57 | ``` |
| 56 | 58 | ||
| 59 | If only the right half has encoders, you must still define an empty array for the left pads (and resolutions, if you define `ENCODER_RESOLUTIONS_RIGHT`). | ||
| 60 | |||
| 61 | ```c | ||
| 62 | #define ENCODERS_PAD_A { } | ||
| 63 | #define ENCODERS_PAD_B { } | ||
| 64 | #define ENCODER_RESOLUTIONS { } | ||
| 65 | #define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } | ||
| 66 | #define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } | ||
| 67 | #define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } | ||
| 68 | ``` | ||
| 69 | |||
| 57 | ## Callbacks | 70 | ## Callbacks |
| 58 | 71 | ||
| 59 | The callback functions can be inserted into your `<keyboard>.c`: | 72 | The callback functions can be inserted into your `<keyboard>.c`: |
