[Jack & Erez] Simplifies and documents TO
This commit is contained in:
		
							parent
							
								
									698d02122b
								
							
						
					
					
						commit
						e27a754b70
					
				
					 3 changed files with 12 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -296,7 +296,10 @@ enum quantum_keycodes {
 | 
			
		|||
// ON_PRESS    = 1
 | 
			
		||||
// ON_RELEASE  = 2
 | 
			
		||||
// Unless you have a good reason not to do so, prefer  ON_PRESS (1) as your default.
 | 
			
		||||
#define TO(layer, when) (layer | QK_TO | (when << 0x4))
 | 
			
		||||
// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
 | 
			
		||||
// keycode modeled after the old version, kept below for this.
 | 
			
		||||
/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */
 | 
			
		||||
#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4))
 | 
			
		||||
 | 
			
		||||
// Momentary switch layer - 256 layer max
 | 
			
		||||
#define MO(layer) (layer | QK_MOMENTARY)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue