mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -64,6 +64,8 @@ cmd_send_keys_inject(struct client *c, struct cmdq_item *item, key_code key)
 | 
				
			|||||||
	struct key_binding	*bd, bd_find;
 | 
						struct key_binding	*bd, bd_find;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (wp->mode == NULL || wp->mode->key_table == NULL) {
 | 
						if (wp->mode == NULL || wp->mode->key_table == NULL) {
 | 
				
			||||||
 | 
							if (options_get_number(wp->window->options, "xterm-keys"))
 | 
				
			||||||
 | 
								key |= KEYC_XTERM;
 | 
				
			||||||
		window_pane_key(wp, NULL, s, key, NULL);
 | 
							window_pane_key(wp, NULL, s, key, NULL);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -176,7 +176,7 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
 | 
				
			|||||||
	 * If this is a normal 7-bit key, just send it, with a leading escape
 | 
						 * If this is a normal 7-bit key, just send it, with a leading escape
 | 
				
			||||||
	 * if necessary. If it is a UTF-8 key, split it and send it.
 | 
						 * if necessary. If it is a UTF-8 key, split it and send it.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	justkey = (key & ~KEYC_ESCAPE);
 | 
						justkey = (key & ~(KEYC_XTERM|KEYC_ESCAPE));
 | 
				
			||||||
	if (justkey <= 0x7f) {
 | 
						if (justkey <= 0x7f) {
 | 
				
			||||||
		if (key & KEYC_ESCAPE)
 | 
							if (key & KEYC_ESCAPE)
 | 
				
			||||||
			bufferevent_write(wp->event, "\033", 1);
 | 
								bufferevent_write(wp->event, "\033", 1);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							@@ -98,8 +98,8 @@ struct tmuxproc;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* Key modifier bits. */
 | 
					/* Key modifier bits. */
 | 
				
			||||||
#define KEYC_ESCAPE 0x200000000000ULL
 | 
					#define KEYC_ESCAPE 0x200000000000ULL
 | 
				
			||||||
#define KEYC_CTRL   0x400000000000ULL
 | 
					#define KEYC_CTRL 0x400000000000ULL
 | 
				
			||||||
#define KEYC_SHIFT  0x800000000000ULL
 | 
					#define KEYC_SHIFT 0x800000000000ULL
 | 
				
			||||||
#define KEYC_XTERM 0x1000000000000ULL
 | 
					#define KEYC_XTERM 0x1000000000000ULL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Mask to obtain key w/o modifiers. */
 | 
					/* Mask to obtain key w/o modifiers. */
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								window.c
									
									
									
									
									
								
							@@ -1240,7 +1240,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
 | 
				
			|||||||
	if (wp->mode != NULL) {
 | 
						if (wp->mode != NULL) {
 | 
				
			||||||
		wp->modelast = time(NULL);
 | 
							wp->modelast = time(NULL);
 | 
				
			||||||
		if (wp->mode->key != NULL)
 | 
							if (wp->mode->key != NULL)
 | 
				
			||||||
			wp->mode->key(wp, c, s, key, m);
 | 
								wp->mode->key(wp, c, s, (key & ~KEYC_XTERM), m);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user