Completed the ^g to ^t transition

In 72a287f189 the escape key was changed from ^g to ^t, but some
code and comments still referred to the old key.
This commit is contained in:
Jakub Wilk 2016-05-07 20:57:30 +02:00
parent 404826d39c
commit 05b6a554d3

View file

@ -73,7 +73,7 @@ void wait_for_tty_device(void)
/* Read one character */ /* Read one character */
n = read(STDIN_FILENO, &c_stdin[0], 1); n = read(STDIN_FILENO, &c_stdin[0], 1);
/* Exit upon ctrl-g + q sequence */ /* Exit upon ctrl-t + q sequence */
c_stdin[2] = c_stdin[1]; c_stdin[2] = c_stdin[1];
c_stdin[1] = c_stdin[0]; c_stdin[1] = c_stdin[0];
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T)) if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T))
@ -210,7 +210,7 @@ int connect_tty(void)
if (option.log) if (option.log)
log_write(c_tty); log_write(c_tty);
if (c_tty != 0x7) // Small trick to avoid ctrl-g echo if (c_tty != KEY_CTRL_T) // Small trick to avoid ctrl-t echo
tainted = true; tainted = true;
} else } else
{ {
@ -226,7 +226,7 @@ int connect_tty(void)
if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T)) if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T))
tainted = true; tainted = true;
/* Exit upon ctrl-g + q sequence */ /* Exit upon ctrl-t + q sequence */
c_stdin[2] = c_stdin[1]; c_stdin[2] = c_stdin[1];
c_stdin[1] = c_stdin[0]; c_stdin[1] = c_stdin[0];
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T)) if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T))