mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-30 21:02:32 +01:00 
			
		
		
		
	Fix keyboards/keymaps for boolean encoder callback changes (#12985)
This commit is contained in:
		
							parent
							
								
									5386c4c7b2
								
							
						
					
					
						commit
						b963049305
					
				| @ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||||
| #ifdef ENCODER_ENABLE | #ifdef ENCODER_ENABLE | ||||||
| bool encoder_update_user(uint8_t index, bool clockwise) { | bool encoder_update_user(uint8_t index, bool clockwise) { | ||||||
|     if (index != 0) |     if (index != 0) | ||||||
|         return; |         return false; | ||||||
| 
 | 
 | ||||||
|     tap_code(clockwise ? KC_VOLU : KC_VOLD); |     tap_code(clockwise ? KC_VOLU : KC_VOLD); | ||||||
|     return true; |     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); |     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
 | #ifdef ENCODER_ENABLE       // Encoder Functionality
 | ||||||
|     uint8_t selected_layer = 0; |     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 |         #ifdef OLED_DRIVER_ENABLE | ||||||
|             oled_clear(); |             oled_clear(); | ||||||
|             oled_render(); |             oled_render(); | ||||||
| @ -81,6 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|         } |         } | ||||||
|  |         return true; | ||||||
|     } |     } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #ifdef ENCODER_ENABLE | #ifdef ENCODER_ENABLE | ||||||
| void encoder_update_user(uint8_t index, bool clockwise) { | bool encoder_update_user(uint8_t index, bool clockwise) { | ||||||
|     switch (index) { |     switch (index) { | ||||||
|         case 0: |         case 0: | ||||||
|             if (clockwise) { |             if (clockwise) { | ||||||
| @ -84,7 +84,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||||||
|             } |             } | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|      |     return true; | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #ifdef ENCODER_ENABLE | #ifdef ENCODER_ENABLE | ||||||
| void encoder_update_user(uint8_t index, bool clockwise) { | bool encoder_update_user(uint8_t index, bool clockwise) { | ||||||
|     switch (index) { |     switch (index) { | ||||||
|         case 0: |         case 0: | ||||||
|             if (clockwise) { |             if (clockwise) { | ||||||
| @ -82,7 +82,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||||||
|             } |             } | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|      |     return true; | ||||||
| } | } | ||||||
| #endif | #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*/ |   if (index == 0) { /* First encoder*/ | ||||||
|     switch(biton32(layer_state)){ |     switch(biton32(layer_state)){ | ||||||
| 		case _MAIN: | 		case _MAIN: | ||||||
| @ -75,6 +75,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||||||
| 			break; | 			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_TO_MAIN] = ACTION_TAP_DANCE_LAYER_MOVE(KC_MUTE, _MAIN), | ||||||
| 	[TD_RESET_SLIDER] = ACTION_TAP_DANCE_LAYER_MOVE(KC_0, _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; | bool encoder_mode = false; | ||||||
| 
 | 
 | ||||||
| void encoder_update(bool clockwise) { | bool encoder_update_user(uint8_t index, bool clockwise) { | ||||||
|   if (index == 0) { /* First encoder */ |   if (index == 0) { /* First encoder */ | ||||||
|     if (clockwise) { |     if (clockwise) { | ||||||
|       #ifdef MOUSEKEY_ENABLE |       #ifdef MOUSEKEY_ENABLE | ||||||
| @ -210,6 +210,7 @@ void encoder_update(bool clockwise) { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |   return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void dip_switch_update_user(uint8_t index, bool active) { | 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 | #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 (index == 0) { | ||||||
|         if (clockwise) { |         if (clockwise) { | ||||||
|             tap_code(KC_VOLU); |             tap_code(KC_VOLU); | ||||||
| @ -566,6 +566,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||||||
| 				break; | 				break; | ||||||
| 		} | 		} | ||||||
|     } |     } | ||||||
|  |     return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -531,7 +531,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||||||
| 
 | 
 | ||||||
| #ifdef ENCODER_ENABLE | #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 (index == 0) { | ||||||
|         if (clockwise) { |         if (clockwise) { | ||||||
|             tap_code(KC_VOLU); |             tap_code(KC_VOLU); | ||||||
| @ -566,6 +566,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||||||
| 				break; | 				break; | ||||||
| 		} | 		} | ||||||
|     } |     } | ||||||
|  |     return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Drashna Jaelre
						Drashna Jaelre