mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Accept hex values as keys, needed for send-keys, based on a diff from
George Nachman.
This commit is contained in:
		@@ -137,6 +137,15 @@ int
 | 
			
		||||
key_string_lookup_string(const char *string)
 | 
			
		||||
{
 | 
			
		||||
	int	key, modifiers;
 | 
			
		||||
	u_short	u;
 | 
			
		||||
	int	size;
 | 
			
		||||
 | 
			
		||||
	/* Is this a hexadecimal value? */
 | 
			
		||||
	if (string[0] == '0' && string[1] == 'x') {
 | 
			
		||||
	        if (sscanf(string + 2, "%hx%n", &u, &size) != 1 || size > 4)
 | 
			
		||||
	                return (KEYC_NONE);
 | 
			
		||||
	        return (u);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Check for modifiers. */
 | 
			
		||||
	modifiers = 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user