Fix keyboards/keymaps for boolean encoder callback changes (#12985)
This commit is contained in:
		
							parent
							
								
									5386c4c7b2
								
							
						
					
					
						commit
						b963049305
					
				
					 9 changed files with 231 additions and 228 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue