Peg Supports encoders configured using an Rotary Encoder Scanners. With this your keymap will hold your encoder keycodes and your keymap keycodes. For your keyboard to be supported you need to configure it with the keycodes for encoders after your keymap keycodes. Eg: 67 key keyboard with one encoder should have 69 keycodes in each layer 67 for the main matrix and 2 for the single encoder at the end of each layer array.
The peg client can not grantee that main.py or layout.json will be loaded first. Because of that we need to know the encoder count in both places.
In main.py add these comments.
# encodercount Is just like any other wrapping comment in Peg, the only difference is that in this case we only wrap another comment.
That comment being a space and number stating how many encoders this keymap has.
Like we go over in the layout docs
Encoders have 2 fields in the