reported by Franky Spamschleuder.
-/* $OpenBSD: cmd-send-keys.c,v 1.41 2017/05/10 10:46:59 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.42 2017/06/28 11:36:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
struct key_binding *bd, bd_find;
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);
return;
}
-/* $OpenBSD: input-keys.c,v 1.61 2017/06/12 07:04:24 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.62 2017/06/28 11:36:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
* 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.
*/
- justkey = (key & ~KEYC_ESCAPE);
+ justkey = (key & ~(KEYC_XTERM|KEYC_ESCAPE));
if (justkey <= 0x7f) {
if (key & KEYC_ESCAPE)
bufferevent_write(wp->event, "\033", 1);
-/* $OpenBSD: tmux.h,v 1.787 2017/06/23 15:36:52 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.788 2017/06/28 11:36:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
/* Key modifier bits. */
#define KEYC_ESCAPE 0x200000000000ULL
-#define KEYC_CTRL 0x400000000000ULL
-#define KEYC_SHIFT 0x800000000000ULL
+#define KEYC_CTRL 0x400000000000ULL
+#define KEYC_SHIFT 0x800000000000ULL
#define KEYC_XTERM 0x1000000000000ULL
/* Mask to obtain key w/o modifiers. */
-/* $OpenBSD: window.c,v 1.198 2017/06/04 09:02:36 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.199 2017/06/28 11:36:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
if (wp->mode != NULL) {
wp->modelast = time(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;
}