diff --git a/README b/README index 8dbb105..51fd50d 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ -v, --version Display version -h, --help Display help - In session, press ctrl-g + q to quit. + In session, press ctrl-t + q to quit. The only option which requires a bit of elaboration is the --no-autoconnect diff --git a/man/tio.1 b/man/tio.1 index b251173..56271e1 100644 --- a/man/tio.1 +++ b/man/tio.1 @@ -61,7 +61,7 @@ Display help. .SH "KEYS" .TP -In session, press ctrl-g + q to quit. +In session, press ctrl-t + q to quit. .SH "EXAMPLES" .TP diff --git a/src/include/tio/tty.h b/src/include/tio/tty.h index 3506024..ffc89e2 100644 --- a/src/include/tio/tty.h +++ b/src/include/tio/tty.h @@ -22,7 +22,7 @@ #ifndef TTY_H #define TTY_H -#define KEY_CTRL_G 0x07 +#define KEY_CTRL_T 0x14 #define KEY_Q 0x71 void configure_stdout(void); diff --git a/src/options.c b/src/options.c index 7aab70f..83d94ec 100644 --- a/src/options.c +++ b/src/options.c @@ -57,7 +57,7 @@ void print_options_help(char *argv[]) printf(" -v, --version Display version\n"); printf(" -h, --help Display help\n"); printf("\n"); - printf("In session, press ctrl-g + q to quit.\n"); + printf("In session, press ctrl-t + q to quit.\n"); printf("\n"); } diff --git a/src/tty.c b/src/tty.c index fd9d838..c3b7314 100644 --- a/src/tty.c +++ b/src/tty.c @@ -76,7 +76,7 @@ void wait_for_tty_device(void) /* Exit upon ctrl-g + q sequence */ c_stdin[2] = c_stdin[1]; c_stdin[1] = c_stdin[0]; - if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_G)) + if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T)) exit(EXIT_SUCCESS); } } @@ -223,13 +223,13 @@ int connect_tty(void) { /* Input from stdin ready */ status = read(STDIN_FILENO, &c_stdin[0], 1); - if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_G)) + if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T)) tainted = true; /* Exit upon ctrl-g + q sequence */ c_stdin[2] = c_stdin[1]; c_stdin[1] = c_stdin[0]; - if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_G)) + if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T)) exit(EXIT_SUCCESS); /* Forward input to tty device */