Add per-key IGNORE_MOD_TAP_INTERRUPT feature (#7838)
* Implement IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add configurable option IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add function get_ignore_mod_tap_interrupt iff the option is enabled Unless IGNORE_MOD_TAP_INTERRUPT_PER_KEY is defined, this patch does not affect the resulting binary. * Add documentation for IGNORE_MOD_TAP_INTERRUPT_PER_KEY
This commit is contained in:
		
							parent
							
								
									e34af631c2
								
							
						
					
					
						commit
						7f388b6553
					
				
					 4 changed files with 44 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -47,6 +47,10 @@ int retro_tapping_counter = 0;
 | 
			
		|||
#    include <fauxclicky.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
 | 
			
		||||
__attribute__ ((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode) { return false; }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef TAP_CODE_DELAY
 | 
			
		||||
#    define TAP_CODE_DELAY 0
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -308,8 +312,12 @@ void process_action(keyrecord_t *record, action_t action) {
 | 
			
		|||
                default:
 | 
			
		||||
                    if (event.pressed) {
 | 
			
		||||
                        if (tap_count > 0) {
 | 
			
		||||
#    ifndef IGNORE_MOD_TAP_INTERRUPT
 | 
			
		||||
                            if (record->tap.interrupted) {
 | 
			
		||||
#    if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY)
 | 
			
		||||
                            if (
 | 
			
		||||
#        ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
 | 
			
		||||
                                !get_ignore_mod_tap_interrupt(get_event_keycode(record->event)) &&
 | 
			
		||||
#        endif
 | 
			
		||||
                                record->tap.interrupted) {
 | 
			
		||||
                                dprint("mods_tap: tap: cancel: add_mods\n");
 | 
			
		||||
                                // ad hoc: set 0 to cancel tap
 | 
			
		||||
                                record->tap.count = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue