Merge pull request #1010 from SjB/oneshot_timeout_fix
oneshot timeout would only timeout after an event.
This commit is contained in:
		
						commit
						b6ffda4849
					
				@ -49,6 +49,13 @@ void action_exec(keyevent_t event)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    keyrecord_t record = { .event = event };
 | 
					    keyrecord_t record = { .event = event };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
 | 
				
			||||||
 | 
					    if (has_oneshot_layer_timed_out()) {
 | 
				
			||||||
 | 
					        dprintf("Oneshot layer: timeout\n");
 | 
				
			||||||
 | 
					        clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef NO_ACTION_TAPPING
 | 
					#ifndef NO_ACTION_TAPPING
 | 
				
			||||||
    action_tapping_process(record);
 | 
					    action_tapping_process(record);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
@ -100,7 +107,7 @@ bool process_record_quantum(keyrecord_t *record) {
 | 
				
			|||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void process_record(keyrecord_t *record) 
 | 
					void process_record(keyrecord_t *record)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (IS_NOEVENT(record->event)) { return; }
 | 
					    if (IS_NOEVENT(record->event)) { return; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action)
 | 
				
			|||||||
    uint8_t tap_count = record->tap.count;
 | 
					    uint8_t tap_count = record->tap.count;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
 | 
					 | 
				
			||||||
    if (has_oneshot_layer_timed_out()) {
 | 
					 | 
				
			||||||
        dprintf("Oneshot layer: timeout\n");
 | 
					 | 
				
			||||||
        clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (event.pressed) {
 | 
					    if (event.pressed) {
 | 
				
			||||||
        // clear the potential weak mods left by previously pressed keys
 | 
					        // clear the potential weak mods left by previously pressed keys
 | 
				
			||||||
        clear_weak_mods();
 | 
					        clear_weak_mods();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user