forked from mirrors/qmk_userspace
		
	Fix flipped One Shot logic (#16617)
This commit is contained in:
		
					parent
					
						
							
								1833e65370
							
						
					
				
			
			
				commit
				
					
						0eb42e042c
					
				
			
		
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -202,8 +202,9 @@ bool is_oneshot_layer_active(void) {
 | 
				
			||||||
 * FIXME: needs doc
 | 
					 * FIXME: needs doc
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void oneshot_set(bool active) {
 | 
					void oneshot_set(bool active) {
 | 
				
			||||||
    if (keymap_config.oneshot_disable != active) {
 | 
					    const bool disable = !active;
 | 
				
			||||||
        keymap_config.oneshot_disable = active;
 | 
					    if (keymap_config.oneshot_disable != disable) {
 | 
				
			||||||
 | 
					        keymap_config.oneshot_disable = disable;
 | 
				
			||||||
        eeconfig_update_keymap(keymap_config.raw);
 | 
					        eeconfig_update_keymap(keymap_config.raw);
 | 
				
			||||||
        clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
 | 
					        clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
 | 
				
			||||||
        dprintf("Oneshot: active: %d\n", active);
 | 
					        dprintf("Oneshot: active: %d\n", active);
 | 
				
			||||||
| 
						 | 
					@ -235,7 +236,7 @@ void oneshot_disable(void) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool is_oneshot_enabled(void) {
 | 
					bool is_oneshot_enabled(void) {
 | 
				
			||||||
    return keymap_config.oneshot_disable;
 | 
					    return !keymap_config.oneshot_disable;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue