Changed quit key sequence to ctrl-g + q

Changed the quit key sequence from ctrl-g + ctrl-q to ctrl-g + q as the
latter is simpler and considered more conventional.
This commit is contained in:
Martin Lund 2014-10-08 19:25:35 +02:00
parent a125dca499
commit 2cf211b99f
3 changed files with 8 additions and 8 deletions

View file

@ -68,10 +68,10 @@ void wait_for_tty_device(void)
/* Read one character */
n = read(STDIN_FILENO, &c_stdin[0], 1);
/* Exit upon ctrl-g ctrl-q sequence */
/* Exit upon ctrl-g + q sequence */
c_stdin[2] = c_stdin[1];
c_stdin[1] = c_stdin[0];
if ((c_stdin[1] == CTRLQ) && (c_stdin[2] == CTRLG))
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_G))
exit(EXIT_SUCCESS);
} else
{
@ -222,13 +222,13 @@ int connect_tty(void)
{
/* Input from stdin ready */
status = read(STDIN_FILENO, &c_stdin[0], 1);
if ((c_stdin[0] != CTRLQ) && (c_stdin[0] != CTRLG))
if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_G))
tainted = true;
/* Exit upon ctrl-g ctrl-q sequence */
/* Exit upon ctrl-g + q sequence */
c_stdin[2] = c_stdin[1];
c_stdin[1] = c_stdin[0];
if ((c_stdin[1] == CTRLQ) && (c_stdin[2] == CTRLG))
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_G))
exit(EXIT_SUCCESS);
/* Forward input to tty device */