diff options
Diffstat (limited to 'keyboards/evolv/evolv.c')
| -rw-r--r-- | keyboards/evolv/evolv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/keyboards/evolv/evolv.c b/keyboards/evolv/evolv.c index 90df449ee..3f2762894 100644 --- a/keyboards/evolv/evolv.c +++ b/keyboards/evolv/evolv.c | |||
| @@ -17,14 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | 17 | ||
| 18 | #include "evolv.h" | 18 | #include "evolv.h" |
| 19 | 19 | ||
| 20 | #ifndef MEDIA_KEY_DELAY | ||
| 21 | # define MEDIA_KEY_DELAY 100 | ||
| 22 | #endif | ||
| 23 | |||
| 20 | bool encoder_update_kb(uint8_t index, bool clockwise) { | 24 | bool encoder_update_kb(uint8_t index, bool clockwise) { |
| 21 | if (!encoder_update_user(index, clockwise)) return false; | 25 | if (!encoder_update_user(index, clockwise)) return false; |
| 22 | if (index == 0) { /* First encoder */ | 26 | tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, MEDIA_KEY_DELAY); |
| 23 | if (clockwise) { | ||
| 24 | tap_code(KC_VOLU); | ||
| 25 | } else { | ||
| 26 | tap_code(KC_VOLD); | ||
| 27 | } | ||
| 28 | } | ||
| 29 | return true; | 27 | return true; |
| 30 | } | 28 | } |
