Add swap hands status function (#19831)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
		
							parent
							
								
									2cdf99ae95
								
							
						
					
					
						commit
						9908ed7ecd
					
				
					 3 changed files with 17 additions and 0 deletions
				
			
		| 
						 | 
					@ -44,3 +44,9 @@ As an example, if a split keyboard has a single encoder per side, you can swap t
 | 
				
			||||||
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = { 1, 0 };
 | 
					const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = { 1, 0 };
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Functions :id=functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					| Function             | Description                                 |
 | 
				
			||||||
 | 
					|----------------------|---------------------------------------------|
 | 
				
			||||||
 | 
					| `is_swap_hands_on()` | Returns true if Swap-Hands is currently on. |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -161,6 +161,10 @@ void set_swap_hands_state(size_t index, uint8_t *swap_state, bool on) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool is_swap_hands_on(void) {
 | 
				
			||||||
 | 
					    return swap_hands;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \brief Process Hand Swap
 | 
					/** \brief Process Hand Swap
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * FIXME: Needs documentation.
 | 
					 * FIXME: Needs documentation.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,6 +84,13 @@ typedef uint32_t swap_state_row_t;
 | 
				
			||||||
#        error "MATRIX_COLS: invalid value"
 | 
					#        error "MATRIX_COLS: invalid value"
 | 
				
			||||||
#    endif
 | 
					#    endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * @brief Get the swap hands enable state
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @return true
 | 
				
			||||||
 | 
					 * @return false
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					bool is_swap_hands_on(void);
 | 
				
			||||||
void process_hand_swap(keyevent_t *record);
 | 
					void process_hand_swap(keyevent_t *record);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue