bento_box.c (810B)
1 // Copyright 2023 Synth-and-Keys (@Synth-and-Keys) 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 /*Main Encoder*/ 12 if (index == 0) { 13 if (clockwise) { 14 tap_code(KC_VOLU); 15 } else { 16 tap_code(KC_VOLD); 17 } 18 } 19 /* TOP LEFT*/ 20 else if (index == 1) { 21 if (clockwise) { 22 tap_code16(C(KC_EQUAL)); 23 } else { 24 tap_code16(C(KC_MINUS)); 25 } 26 } 27 /* TOP RIGHT*/ 28 else if (index == 2) { 29 if (clockwise) { 30 tap_code16(C(KC_Y)); 31 } else { 32 tap_code16(C(KC_Z)); 33 } 34 } 35 return true; 36 } 37 #endif