Make PREVENT_STUCK_MODIFIERS the default (#3107)
				
					
				
			* Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
This commit is contained in:
		
							parent
							
								
									b65e214375
								
							
						
					
					
						commit
						743449472e
					
				
					 198 changed files with 91 additions and 599 deletions
				
			
		| 
						 | 
				
			
			@ -120,7 +120,7 @@ void process_hand_swap(keyevent_t *event) {
 | 
			
		|||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 | 
			
		||||
bool disable_action_cache = false;
 | 
			
		||||
 | 
			
		||||
void process_record_nocache(keyrecord_t *record)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -62,7 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
 | 
			
		|||
bool process_record_quantum(keyrecord_t *record);
 | 
			
		||||
 | 
			
		||||
/* Utilities for actions.  */
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 | 
			
		||||
extern bool disable_action_cache;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -219,7 +219,7 @@ void layer_debug(void)
 | 
			
		|||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 | 
			
		||||
uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {{0}};
 | 
			
		||||
 | 
			
		||||
void update_source_layers_cache(keypos_t key, uint8_t layer)
 | 
			
		||||
| 
						 | 
				
			
			@ -263,7 +263,7 @@ uint8_t read_source_layers_cache(keypos_t key)
 | 
			
		|||
 */
 | 
			
		||||
action_t store_or_get_action(bool pressed, keypos_t key)
 | 
			
		||||
{
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 | 
			
		||||
    if (disable_action_cache) {
 | 
			
		||||
        return layer_switch_get_action(key);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -88,7 +88,7 @@ uint32_t layer_state_set_kb(uint32_t state);
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
/* pressed actions cache */
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
 | 
			
		||||
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 | 
			
		||||
/* The number of bits needed to represent the layer number: log2(32). */
 | 
			
		||||
#define MAX_LAYER_BITS 5
 | 
			
		||||
void update_source_layers_cache(keypos_t key, uint8_t layer);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue