tui/input.c: Handle Ctrl-Z (suspend) for TERM=linux (#3100) (#4911)

Fix #3100.

On virtual consoles (Alt-F1, etc.), the Ctrl-Z combination was lost.
This commit is contained in:
Mateusz Czapliński 2016-06-12 04:56:37 +00:00 committed by Justin M. Keyes
parent e7ab3e7e59
commit e247e3acdd

View File

@ -139,6 +139,9 @@ static void forward_modified_utf8(TermInput *input, TermKeyKey *key)
if (key->type == TERMKEY_TYPE_KEYSYM
&& key->code.sym == TERMKEY_SYM_ESCAPE) {
len = (size_t)snprintf(buf, sizeof(buf), "<Esc>");
} else if (key->type == TERMKEY_TYPE_KEYSYM
&& key->code.sym == TERMKEY_SYM_SUSPEND) {
len = (size_t)snprintf(buf, sizeof(buf), "<C-Z>");
} else {
len = termkey_strfkey(input->tk, buf, sizeof(buf), key, TERMKEY_FORMAT_VIM);
}