Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									76c23b15ab
								
							
						
					
					
						commit
						a0fed0ea17
					
				
					 437 changed files with 2542 additions and 2135 deletions
				
			
		| 
						 | 
				
			
			@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
                                                   KC_BSPC, KC_DEL,   KC_ENT,  KC_SPC \
 | 
			
		||||
 | 
			
		||||
  ),
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  [_QWERTY] = LAYOUT( \
 | 
			
		||||
      KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_HOME,  KC_PGUP, KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSLS, \
 | 
			
		||||
      KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_END,   KC_PGDN, KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_SLSH, \
 | 
			
		||||
| 
						 | 
				
			
			@ -253,7 +253,7 @@ const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2]  = {
 | 
			
		|||
    )
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		||||
bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		||||
  if (!is_keyboard_master())
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -274,6 +274,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		|||
    if (keycode != KC_TRANSPARENT)
 | 
			
		||||
      tap_code16(keycode);
 | 
			
		||||
  }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -358,4 +359,4 @@ void oled_task_user(void) {
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue