]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[terminal] Force enter to output newline
authorRay Strode <rstrode@redhat.com>
Wed, 30 Jun 2010 23:43:16 +0000 (19:43 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 30 Jun 2010 23:43:16 +0000 (19:43 -0400)
This matches the default unix behavior, and so we're going to be a lot
more robust against our terminal settings getting mucked with.

src/libply-splash-core/ply-keyboard.c
src/libply-splash-core/ply-terminal.c

index 0f26bb42cc5632114bc7ddb3a1d03c164c94f56c..b5b4c3920de913081ada51e12dc7c04d53dbcdf7 100644 (file)
@@ -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 *);
index 6140fa450afa8f23fd664a2a92fc85913d744169..028551d6511088a05c210852b80c107536127be8 100644 (file)
@@ -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;