mirror of
https://github.com/tmux/tmux.git
synced 2025-01-08 08:58:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
fb9e53ba19
31
input-keys.c
31
input-keys.c
@ -497,10 +497,35 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
|
|||||||
|
|
||||||
/* No builtin key sequence; construct an extended key sequence. */
|
/* No builtin key sequence; construct an extended key sequence. */
|
||||||
if (~s->mode & MODE_KEXTENDED) {
|
if (~s->mode & MODE_KEXTENDED) {
|
||||||
if ((key & KEYC_MASK_MODIFIERS) == KEYC_CTRL &&
|
justkey = (key & KEYC_MASK_KEY);
|
||||||
(key & KEYC_MASK_KEY) < KEYC_BASE)
|
if ((key & KEYC_MASK_MODIFIERS) != KEYC_CTRL)
|
||||||
return (input_key(s, bev, key & ~KEYC_CTRL));
|
|
||||||
goto missing;
|
goto missing;
|
||||||
|
switch (justkey) {
|
||||||
|
case ' ':
|
||||||
|
case '2':
|
||||||
|
key = 0||(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
case '|':
|
||||||
|
key = 28|(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
key = 30|(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
case '-':
|
||||||
|
case '/':
|
||||||
|
key = 31|(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
key = 127|(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (justkey >= 'A' && justkey <= '_')
|
||||||
|
key = (justkey - 'A')|(key & ~KEYC_MASK_KEY);
|
||||||
|
else if (justkey >= 'a' && justkey <= '~')
|
||||||
|
key = (justkey - 96)|(key & ~KEYC_MASK_KEY);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return (input_key(s, bev, key & ~KEYC_CTRL));
|
||||||
}
|
}
|
||||||
outkey = (key & KEYC_MASK_KEY);
|
outkey = (key & KEYC_MASK_KEY);
|
||||||
switch (key & KEYC_MASK_MODIFIERS) {
|
switch (key & KEYC_MASK_MODIFIERS) {
|
||||||
|
@ -343,7 +343,7 @@ tty_default_features(int *feat, const char *name, u_int version)
|
|||||||
.features = "256,bpaste,ccolour,cstyle,title"
|
.features = "256,bpaste,ccolour,cstyle,title"
|
||||||
},
|
},
|
||||||
{ .name = "iTerm2",
|
{ .name = "iTerm2",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM ",cstyle,margins,sync"
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ",cstyle,extkeys,margins,sync"
|
||||||
},
|
},
|
||||||
{ .name = "XTerm",
|
{ .name = "XTerm",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM ",ccolour,cstyle,extkeys,focus,margins,rectfill"
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ",ccolour,cstyle,extkeys,focus,margins,rectfill"
|
||||||
|
Loading…
Reference in New Issue
Block a user