Fixing encoder skipping in QMK firmware
Pressing an encoder doesn't provide output
If pressing doesn't work, but turning does, you may need to adjust the height of your encoder knob.
I can't flash my keyboard
For your firmware flashing troubles
When to use
You should use this document when you're using and/or experiencing the following.
Situations
Use this page when:
- You are using QMK or Vial firmware.
- You need to turn your rotary encoder for two "ticks" for your keyboard to perform one action.
Expected outcome
After following the instructions on this page:
- The keyboard performs one action for every one "tick" while turning the encoder.
When to avoid
Do not use this page when:
- You are using any other encoder. The ALPS Gray encoder is discontinued.
Not all encoders are the same. Depending on your encoder, you may need to alter your firmware for it to properly pick up all the rotations of your encoder.
By default, the encoder resolution is set to 4. If you use the gray EC11K Industrial Encoder, you should use a resolution of 2. If you don't, it will drop every other action when you rotate the encoder.
When using info.json
or keyboard.json
Find the encoder
object in your file, and add the resolution
property to it. It will look similar to:
"encoder": {
"enabled": true,
"rotary": [
{"pin_a": "F4", "pin_b": "F5"}
],
"resolution": 2
},
Compile your firmware and flash it to both sides of your keyboard, and the encoder should work properly again.
When using config.h
Add the following to your config.h
file:
// EC11K encoders have a different resolution than other EC11 encoders.
// When using the default resolution of 4, if you notice your encoder skipping
// every other tick, lower the resolution to 2.
#define ENCODER_RESOLUTION 2
Compile your firmware and flash it to both sides of your keyboard, and the encoder should work properly again.
Pressing an encoder doesn't provide output
If pressing doesn't work, but turning does, you may need to adjust the height of your encoder knob.
I can't flash my keyboard
For your firmware flashing troubles