mirror of
https://github.com/nalf3in/vial-qmk.git
synced 2025-12-22 03:30:03 +00:00
Various fixes for keyboards not implementing callbacks correctly (#24116)
This commit is contained in:
@@ -130,11 +130,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
|
||||
__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
if (encoder_update_user(index, clockwise)) {
|
||||
// Encoder 1, outside left
|
||||
if (index == 0 && clockwise) {
|
||||
tap_code(KC_MS_U); // turned right
|
||||
|
||||
@@ -24,8 +24,5 @@ enum TWOx1800_keycodes {
|
||||
ENC_BTN4,
|
||||
};
|
||||
|
||||
// Encoder update function that returns true/false
|
||||
bool encoder_update_keymap(uint8_t index, bool clockwise);
|
||||
|
||||
// Encoder button combo check
|
||||
void check_encoder_buttons(void);
|
||||
|
||||
@@ -96,16 +96,11 @@ void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
bool encoder_update_keymap(int8_t index, bool clockwise) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#define NUM_COLUMNS 8*MAX7219_CONTROLLERS
|
||||
uint8_t led_position[2] = {0,0}; // The location of the cursor in the matrix
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_keymap(index, clockwise)) {
|
||||
if (encoder_update_user(index, clockwise)) {
|
||||
#if defined(DRAWING_TOY_MODE)
|
||||
// Encoder 1, left
|
||||
if (index == 0 && clockwise) {
|
||||
|
||||
Reference in New Issue
Block a user