mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 05:54:47 +02:00
Rewrite xterm-keys code (both input and output) so that works (doesn't always
output the same modifiers, accepts all the possible input keys) and is more understandable.
This commit is contained in:
12
input-keys.c
12
input-keys.c
@ -174,6 +174,18 @@ input_key(struct window_pane *wp, int key)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Then try to look this up as an xterm key, if the flag to output them
|
||||
* is set.
|
||||
*/
|
||||
if (options_get_number(&wp->window->options, "xterm-keys")) {
|
||||
if ((out = xterm_keys_lookup(key)) != NULL) {
|
||||
buffer_write(wp->out, out, strlen(out));
|
||||
xfree(out);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise look the key up in the table. */
|
||||
for (i = 0; i < nitems(input_keys); i++) {
|
||||
ike = &input_keys[i];
|
||||
|
Reference in New Issue
Block a user