Er, misread this and it is not needed.

This commit is contained in:
Nicholas Marriott 2020-05-15 18:58:13 +01:00
parent ca60aabab5
commit 401f197750
2 changed files with 1 additions and 119 deletions

View File

@ -499,66 +499,6 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
if (~s->mode & MODE_KEXTENDED)
goto missing;
outkey = (key & KEYC_MASK_KEY);
if (outkey >= KEYC_BASE) {
switch (outkey) {
case KEYC_IC:
outkey = 2;
break;
case KEYC_DC:
outkey = 3;
break;
case KEYC_PPAGE:
outkey = 5;
break;
case KEYC_NPAGE:
outkey = 6;
break;
case KEYC_HOME:
outkey = 7;
break;
case KEYC_END:
outkey = 8;
break;
case KEYC_F1:
outkey = 11;
break;
case KEYC_F2:
outkey = 12;
break;
case KEYC_F3:
outkey = 13;
break;
case KEYC_F4:
outkey = 14;
break;
case KEYC_F5:
outkey = 15;
break;
case KEYC_F6:
outkey = 17;
break;
case KEYC_F7:
outkey = 18;
break;
case KEYC_F8:
outkey = 19;
break;
case KEYC_F9:
outkey = 20;
break;
case KEYC_F10:
outkey = 21;
break;
case KEYC_F11:
outkey = 23;
break;
case KEYC_F12:
outkey = 24;
break;
default:
goto missing;
}
}
switch (key & KEYC_MASK_MODIFIERS) {
case KEYC_SHIFT:
modifier = '2';

View File

@ -896,65 +896,7 @@ tty_keys_extended_key(struct tty *tty, const char *buf, size_t len,
*size = end + 1;
/* Store the key and modifiers. */
switch (number) {
case 2:
*key = KEYC_IC;
break;
case 3:
*key = KEYC_DC;
break;
case 5:
*key = KEYC_PPAGE;
break;
case 6:
*key = KEYC_NPAGE;
break;
case 7:
*key = KEYC_HOME;
break;
case 8:
*key = KEYC_END;
break;
case 11:
*key = KEYC_F1;
break;
case 12:
*key = KEYC_F2;
break;
case 13:
*key = KEYC_F3;
break;
case 14:
*key = KEYC_F4;
break;
case 15:
*key = KEYC_F5;
break;
case 17:
*key = KEYC_F6;
break;
case 18:
*key = KEYC_F7;
break;
case 19:
*key = KEYC_F8;
break;
case 20:
*key = KEYC_F9;
break;
case 21:
*key = KEYC_F10;
break;
case 23:
*key = KEYC_F11;
break;
case 24:
*key = KEYC_F12;
break;
default:
*key = number;
break;
}
*key = number;
switch (modifiers) {
case 2:
(*key) |= KEYC_SHIFT;