mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Add an option to set the key sent by backspace for those whose system
uses ^H rather than ^?. GitHub issue 1969.
This commit is contained in:
10
input-keys.c
10
input-keys.c
@ -43,9 +43,6 @@ struct input_key_ent {
|
||||
};
|
||||
|
||||
static const struct input_key_ent input_keys[] = {
|
||||
/* Backspace key. */
|
||||
{ KEYC_BSPACE, "\177", 0 },
|
||||
|
||||
/* Paste keys. */
|
||||
{ KEYC_PASTE_START, "\033[200~", 0 },
|
||||
{ KEYC_PASTE_END, "\033[201~", 0 },
|
||||
@ -180,6 +177,13 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Is this backspace? */
|
||||
if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) {
|
||||
key = options_get_number(global_options, "backspace");
|
||||
if (key >= 0x7f)
|
||||
key = '\177';
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
Reference in New Issue
Block a user