mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-11-03 23:02:34 +01:00 
			
		
		
		
	Make action_for_key a weak symbol
This commit is contained in:
		
							parent
							
								
									81137b7a61
								
							
						
					
					
						commit
						c17b8a599e
					
				@ -51,6 +51,7 @@ void action_exec(keyevent_t event);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* action for key */
 | 
					/* action for key */
 | 
				
			||||||
action_t action_for_key(uint8_t layer, keypos_t key);
 | 
					action_t action_for_key(uint8_t layer, keypos_t key);
 | 
				
			||||||
 | 
					action_t action_for_key_default(uint8_t layer, keypos_t key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* macro */
 | 
					/* macro */
 | 
				
			||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
 | 
					const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
 | 
				
			||||||
 | 
				
			|||||||
@ -27,8 +27,13 @@ static action_t keycode_to_action(uint8_t keycode);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* converts key to action */
 | 
					/* converts key to action */
 | 
				
			||||||
 | 
					__attribute__((__weak__))
 | 
				
			||||||
action_t action_for_key(uint8_t layer, keypos_t key)
 | 
					action_t action_for_key(uint8_t layer, keypos_t key)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						return action_for_key_default(layer, key);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					action_t action_for_key_default(uint8_t layer, keypos_t key)
 | 
				
			||||||
    uint8_t keycode = keymap_key_to_keycode(layer, key);
 | 
					    uint8_t keycode = keymap_key_to_keycode(layer, key);
 | 
				
			||||||
    switch (keycode) {
 | 
					    switch (keycode) {
 | 
				
			||||||
        case KC_FN0 ... KC_FN31:
 | 
					        case KC_FN0 ... KC_FN31:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user