Fix keyboards/keymaps for boolean encoder callback changes (#12985)

This commit is contained in:
Drashna Jaelre 2021-05-27 21:30:47 -07:00 committed by GitHub
parent 5386c4c7b2
commit b963049305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 231 additions and 228 deletions

View file

@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index != 0)
return;
return false;
tap_code(clockwise ? KC_VOLU : KC_VOLD);
return true;

View file

@ -107,6 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_VOLU : KC_VOLD);
return true;
}

View file

@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_ENABLE // Encoder Functionality
uint8_t selected_layer = 0;
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
#ifdef OLED_DRIVER_ENABLE
oled_clear();
oled_render();
@ -81,6 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
}
}
return true;
}
#endif

View file

@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
@ -84,7 +84,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
return true;
}
#endif

View file

@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
@ -82,7 +82,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
return true;
}
#endif

View file

@ -35,7 +35,7 @@ enum tap_dances{
};
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder*/
switch(biton32(layer_state)){
case _MAIN:
@ -75,6 +75,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
return true;
}
//
@ -121,6 +122,3 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[TD_TO_MAIN] = ACTION_TAP_DANCE_LAYER_MOVE(KC_MUTE, _MAIN),
[TD_RESET_SLIDER] = ACTION_TAP_DANCE_LAYER_MOVE(KC_0, _MAIN)
};

View file

@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool encoder_mode = false;
void encoder_update(bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
@ -210,6 +210,7 @@ void encoder_update(bool clockwise) {
}
}
}
return true;
}
void dip_switch_update_user(uint8_t index, bool active) {

View file

@ -531,7 +531,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@ -566,6 +566,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
return true;
}
#endif

View file

@ -531,7 +531,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@ -566,6 +566,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
return true;
}
#endif