xterm-keys has been on by default for 5 years and all other modern terminals

use these key sequences by default. Merge the code into the main tty and input
tree processing (convering the latter to use a tree rather than a table at the
same time) and make the option a no-op.
This commit is contained in:
Nicholas Marriott
2020-05-15 10:31:54 +01:00
parent c4d8100b2f
commit 5ee4d991b6
9 changed files with 471 additions and 449 deletions

10
tmux.h
View File

@ -125,6 +125,8 @@ struct winlink;
#define KEYC_SHIFT 0x0400000000000ULL
#define KEYC_XTERM 0x0800000000000ULL
#define KEYC_LITERAL 0x1000000000000ULL
#define KEYC_KEYPAD 0x2000000000000ULL
#define KEYC_CURSOR 0x4000000000000ULL
/* Available user keys. */
#define KEYC_NUSER 1000
@ -2417,16 +2419,12 @@ void input_parse_screen(struct input_ctx *, struct screen *,
screen_write_init_ctx_cb, void *, u_char *, size_t);
/* input-key.c */
void input_key_build(void);
int input_key_pane(struct window_pane *, key_code, struct mouse_event *);
int input_key(struct window_pane *, struct screen *, struct bufferevent *,
key_code);
int input_key(struct screen *, struct bufferevent *, key_code);
int input_key_get_mouse(struct screen *, struct mouse_event *, u_int,
u_int, const char **, size_t *);
/* xterm-keys.c */
char *xterm_keys_lookup(key_code);
int xterm_keys_find(const char *, size_t, size_t *, key_code *);
/* colour.c */
int colour_find_rgb(u_char, u_char, u_char);
int colour_join_rgb(u_char, u_char, u_char);