mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Modify the terminal initialization sequence
We disable the ICRNL flag to make Enter independent from ^J from the keybinding point of view since the former will now send ^M, leaving the user free to remap ^J without trapping itself into the irssi session because of a broken Enter key. Also disable the software flow control because we don't expect anyone to run irssi over a serial console; we gain some more freedom by having ^Q and ^S freely mappable by the user.
This commit is contained in:
parent
762c1d7f2c
commit
061fb34750
1 changed files with 3 additions and 0 deletions
|
|
@ -502,6 +502,9 @@ static void terminfo_input_init(TERM_REC *term)
|
|||
memcpy(&term->tio, &term->old_tio, sizeof(term->tio));
|
||||
|
||||
term->tio.c_lflag &= ~(ICANON | ECHO); /* CBREAK, no ECHO */
|
||||
/* Disable the ICRNL flag to disambiguate ^J and Enter, also disable the
|
||||
* software flow control to leave ^Q and ^S ready to be bound */
|
||||
term->tio.c_iflag &= ~(ICRNL | IXON | IXOFF);
|
||||
term->tio.c_cc[VMIN] = 1; /* read() is satisfied after 1 char */
|
||||
term->tio.c_cc[VTIME] = 0; /* No timer */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue