macro3.c (626B)
1 /* Copyright 2020 David Philip Barr <@davidphilipbarr> 2 * Copyright 2021 @filterpaper 3 * SPDX-License-Identifier: GPL-2.0+ 4 */ 5 6 #include "quantum.h" 7 8 #ifdef ENCODER_ENABLE 9 bool encoder_update_kb(uint8_t index, bool clockwise) { 10 if (!encoder_update_user(index, clockwise)) { return false; } 11 if (index == 0) { 12 if (clockwise) { 13 tap_code_delay(KC_VOLU, 10); 14 } else { 15 tap_code_delay(KC_VOLD, 10); 16 } 17 } else if (index == 1) { 18 if (clockwise) { 19 tap_code(KC_MNXT); 20 } else { 21 tap_code(KC_MPRV); 22 } 23 } 24 return true; 25 } 26 #endif 27