mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 05:12:33 +01:00 
			
		
		
		
	Prevent tap dance from wiping dynamic macros (#17880)
This commit is contained in:
		
							parent
							
								
									de19cb7b22
								
							
						
					
					
						commit
						c0e6a28bc6
					
				| @ -45,6 +45,10 @@ __attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) { | |||||||
|     dynamic_macro_led_blink(); |     dynamic_macro_led_blink(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | __attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrecord_t *record) { | ||||||
|  |     return true; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /* Convenience macros used for retrieving the debug info. All of them
 | /* Convenience macros used for retrieving the debug info. All of them
 | ||||||
|  * need a `direction` variable accessible at the call site. |  * need a `direction` variable accessible at the call site. | ||||||
|  */ |  */ | ||||||
| @ -252,6 +256,7 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { | |||||||
|                 return false; |                 return false; | ||||||
| #endif | #endif | ||||||
|             default: |             default: | ||||||
|  |                 if (dynamic_macro_valid_key_user(keycode, record)) { | ||||||
|                     /* Store the key in the macro buffer and process it normally. */ |                     /* Store the key in the macro buffer and process it normally. */ | ||||||
|                     switch (macro_id) { |                     switch (macro_id) { | ||||||
|                         case 1: |                         case 1: | ||||||
| @ -261,6 +266,7 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { | |||||||
|                             dynamic_macro_record_key(r_macro_buffer, ¯o_pointer, macro_end, -1, record); |                             dynamic_macro_record_key(r_macro_buffer, ¯o_pointer, macro_end, -1, record); | ||||||
|                             break; |                             break; | ||||||
|                     } |                     } | ||||||
|  |                 } | ||||||
|                 return true; |                 return true; | ||||||
|                 break; |                 break; | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jason Ken Adhinarta
						Jason Ken Adhinarta