mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Add -l flag to send-keys to send input literally (without translating
key names). From Frank Terbeck.
This commit is contained in:
		@@ -31,8 +31,8 @@ int	cmd_send_keys_exec(struct cmd *, struct cmd_ctx *);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const struct cmd_entry cmd_send_keys_entry = {
 | 
					const struct cmd_entry cmd_send_keys_entry = {
 | 
				
			||||||
	"send-keys", "send",
 | 
						"send-keys", "send",
 | 
				
			||||||
	"Rt:", 0, -1,
 | 
						"lRt:", 0, -1,
 | 
				
			||||||
	"[-R] [-t target-pane] key ...",
 | 
						"[-lR] [-t target-pane] key ...",
 | 
				
			||||||
	0,
 | 
						0,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
@@ -71,7 +71,8 @@ cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
				
			|||||||
	for (i = 0; i < args->argc; i++) {
 | 
						for (i = 0; i < args->argc; i++) {
 | 
				
			||||||
		str = args->argv[i];
 | 
							str = args->argv[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((key = key_string_lookup_string(str)) != KEYC_NONE) {
 | 
							if (!args_has(args, 'l') &&
 | 
				
			||||||
 | 
							    (key = key_string_lookup_string(str)) != KEYC_NONE) {
 | 
				
			||||||
			    window_pane_key(wp, s, key);
 | 
								    window_pane_key(wp, s, key);
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			for (; *str != '\0'; str++)
 | 
								for (; *str != '\0'; str++)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tmux.1
									
									
									
									
									
								
							@@ -1646,7 +1646,7 @@ are listed; this may be one of:
 | 
				
			|||||||
or
 | 
					or
 | 
				
			||||||
.Em emacs-copy .
 | 
					.Em emacs-copy .
 | 
				
			||||||
.It Xo Ic send-keys
 | 
					.It Xo Ic send-keys
 | 
				
			||||||
.Fl R
 | 
					.Op Fl lR
 | 
				
			||||||
.Op Fl t Ar target-pane
 | 
					.Op Fl t Ar target-pane
 | 
				
			||||||
.Ar key Ar ...
 | 
					.Ar key Ar ...
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
@@ -1660,6 +1660,9 @@ or
 | 
				
			|||||||
.Ql npage
 | 
					.Ql npage
 | 
				
			||||||
) to send; if the string is not recognised as a key, it is sent as a series of
 | 
					) to send; if the string is not recognised as a key, it is sent as a series of
 | 
				
			||||||
characters.
 | 
					characters.
 | 
				
			||||||
 | 
					The
 | 
				
			||||||
 | 
					.Fl l
 | 
				
			||||||
 | 
					flag disables key name lookup and sends the keys literally.
 | 
				
			||||||
All arguments are sent sequentially from first to last.
 | 
					All arguments are sent sequentially from first to last.
 | 
				
			||||||
The
 | 
					The
 | 
				
			||||||
.Fl R
 | 
					.Fl R
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user