qmk

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

commit 24b3556e844ec76813a42ce4c5b7a77a6f874d5a
parent 85688e5b52112c86895171d3dc8b26610480e932
Author: Jack Humbert <jack.humb@gmail.com>
Date:   Fri, 26 Oct 2018 16:47:00 -0400

add better example

Diffstat:
docs/feature_encoders.md | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md @@ -32,10 +32,17 @@ The callback functions can be inserted into your `<keyboard>.c`: or `keymap.c`: void encoder_update_user(uint8_t index, bool clockwise) { - + if (index == 0) { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } } - ## Hardware The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.