rev2.c (643B)
1 // Copyright 2025 splitkb.com (support@splitkb.com) 2 // SPDX-License-Identifier: GPL-2.0-or-later 3 4 #include "quantum.h" 5 6 #ifdef ENCODER_ENABLE 7 bool encoder_update_kb(uint8_t index, bool clockwise) { 8 if (!encoder_update_user(index, clockwise)) { 9 return false; 10 } 11 if (index == 0) { 12 // Volume control 13 if (clockwise) { 14 tap_code(KC_VOLU); 15 } else { 16 tap_code(KC_VOLD); 17 } 18 } else if (index == 1) { 19 // Page up/Page down 20 if (clockwise) { 21 tap_code(KC_PGDN); 22 } else { 23 tap_code(KC_PGUP); 24 } 25 } 26 return false; 27 } 28 #endif