mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 15:58:20 +02:00
[terminal] Force enter to output newline
This matches the default unix behavior, and so we're going to be a lot more robust against our terminal settings getting mucked with.
This commit is contained in:
parent
3875c30854
commit
4081bd29fb
2 changed files with 4 additions and 1 deletions
|
|
@ -45,7 +45,7 @@
|
|||
#define KEY_CTRL_W ('\100' ^'W')
|
||||
#define KEY_CTRL_V ('\100' ^'V')
|
||||
#define KEY_ESCAPE ('\100' ^'[')
|
||||
#define KEY_RETURN '\r'
|
||||
#define KEY_RETURN '\n'
|
||||
#define KEY_BACKSPACE '\177'
|
||||
|
||||
typedef void (* ply_keyboard_handler_t) (void *);
|
||||
|
|
|
|||
|
|
@ -182,6 +182,9 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal)
|
|||
|
||||
cfmakeraw (&term_attributes);
|
||||
|
||||
/* Make return output new line like canonical mode */
|
||||
term_attributes.c_iflag |= ICRNL;
|
||||
|
||||
/* Make \n return go to the beginning of the next line */
|
||||
term_attributes.c_oflag |= ONLCR;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue