mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add map FF to ESC-c on input
Added map of form feed to ESC-c on input for terminals that do not clear screen on ^L but do on ESC-c.
This commit is contained in:
parent
553b67e406
commit
58c9489b92
4 changed files with 15 additions and 1 deletions
10
src/tty.c
10
src/tty.c
|
|
@ -145,6 +145,7 @@ static bool connected = false;
|
|||
static bool standard_baudrate = true;
|
||||
static void (*print)(char c);
|
||||
static int fd;
|
||||
static bool map_i_ff_escc = false;
|
||||
static bool map_i_nl_crnl = false;
|
||||
static bool map_o_cr_nl = false;
|
||||
static bool map_o_nl_crnl = false;
|
||||
|
|
@ -1070,6 +1071,10 @@ void tty_configure(void)
|
|||
{
|
||||
map_o_del_bs = true;
|
||||
}
|
||||
else if (strcmp(token,"IFFESCC") == 0)
|
||||
{
|
||||
map_i_ff_escc = true;
|
||||
}
|
||||
else if (strcmp(token,"INLCRNL") == 0)
|
||||
{
|
||||
map_i_nl_crnl = true;
|
||||
|
|
@ -1463,6 +1468,11 @@ int tty_connect(void)
|
|||
next_timestamp = true;
|
||||
}
|
||||
}
|
||||
else if ((input_char == '\f') && (map_i_ff_escc) && (!map_o_msblsb))
|
||||
{
|
||||
print('\e');
|
||||
print('c');
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Print received tty character to stdout */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue