diff --git a/keyboards/keychron/keychron.c b/keyboards/keychron/keychron.c new file mode 100644 index 000000000000..14a1c6af01c5 --- /dev/null +++ b/keyboards/keychron/keychron.c @@ -0,0 +1,28 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "quantum.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return true; +} +#endif // ENCODER_ENABLE \ No newline at end of file diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index ffe82a6d8c7e..d7ee6c2272ea 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -55,3 +55,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {0, C_2, A_2, B_2}, // 20 }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c index bc559b354166..6aaa6003ad06 100644 --- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c @@ -146,3 +146,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/q1/q1.c b/keyboards/keychron/q1/q1.c index 3df62c4339bf..1ab6a02b171b 100644 --- a/keyboards/keychron/q1/q1.c +++ b/keyboards/keychron/q1/q1.c @@ -35,4 +35,4 @@ bool dip_switch_update_kb(uint8_t index, bool active) { return true; } -#endif // DIP_SWITCH_ENABLE +#endif // DIP_SWITCH_ENABLE \ No newline at end of file diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c index c5abcb4f6ee0..36b880cc52b9 100644 --- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c @@ -155,3 +155,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.c b/keyboards/keychron/q10/iso_encoder/iso_encoder.c index 1e8f80ddd875..833b1a4c3273 100644 --- a/keyboards/keychron/q10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q10/iso_encoder/iso_encoder.c @@ -156,3 +156,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c index fffa00194d6e..2e06fc32e610 100644 --- a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c @@ -133,3 +133,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c index de0eda1c023a..d7f9fc605fd3 100644 --- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c @@ -111,3 +111,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c index bada8af6e98f..57b9fa87b566 100644 --- a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c @@ -155,3 +155,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE + diff --git a/keyboards/keychron/v10/iso_encoder/iso_encoder.c b/keyboards/keychron/v10/iso_encoder/iso_encoder.c index 070a01a8a828..f982d677a950 100644 --- a/keyboards/keychron/v10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v10/iso_encoder/iso_encoder.c @@ -156,3 +156,4 @@ led_config_t g_led_config = { }; #endif // RGB_MATRIX_ENABLE +