diff options
author | npspears <40127181+npspears@users.noreply.github.com> | 2022-07-02 09:01:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-03 00:01:08 +1000 |
commit | 60ab61386e786075f0606a5a8b308d82e842f996 (patch) | |
tree | cf4fc15f36ec2fed925a9e4422f898c884bf5c3f /keyboards/checkerboards/quark_squared/quark_squared.c | |
parent | 5ac71ef27acc3ed9178e3204078779bc9ff1047d (diff) |
add rotary encoder support for Quark^2 (#17470)
Diffstat (limited to 'keyboards/checkerboards/quark_squared/quark_squared.c')
-rw-r--r-- | keyboards/checkerboards/quark_squared/quark_squared.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/checkerboards/quark_squared/quark_squared.c b/keyboards/checkerboards/quark_squared/quark_squared.c index fbd7346cc0..1ead754eaf 100644 --- a/keyboards/checkerboards/quark_squared/quark_squared.c +++ b/keyboards/checkerboards/quark_squared/quark_squared.c @@ -15,3 +15,15 @@ */ #include "quark_squared.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLD, 10); + } else { + tap_code_delay(KC_VOLU, 10); + } + } + return true; +} |