mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Changed escape key from ^g to ^t
After renaming to "tio" it makes sense to change the escape key accordingly. Hence, the new escape key is ^t. Meaning, in session, its now ctrl-t + q to quit.
This commit is contained in:
parent
f6b69d244d
commit
72a287f189
5 changed files with 7 additions and 7 deletions
2
README
2
README
|
|
@ -30,7 +30,7 @@
|
||||||
-v, --version Display version
|
-v, --version Display version
|
||||||
-h, --help Display help
|
-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
|
The only option which requires a bit of elaboration is the --no-autoconnect
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ Display help.
|
||||||
|
|
||||||
.SH "KEYS"
|
.SH "KEYS"
|
||||||
.TP
|
.TP
|
||||||
In session, press ctrl-g + q to quit.
|
In session, press ctrl-t + q to quit.
|
||||||
|
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
.TP
|
.TP
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#ifndef TTY_H
|
#ifndef TTY_H
|
||||||
#define TTY_H
|
#define TTY_H
|
||||||
|
|
||||||
#define KEY_CTRL_G 0x07
|
#define KEY_CTRL_T 0x14
|
||||||
#define KEY_Q 0x71
|
#define KEY_Q 0x71
|
||||||
|
|
||||||
void configure_stdout(void);
|
void configure_stdout(void);
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ void print_options_help(char *argv[])
|
||||||
printf(" -v, --version Display version\n");
|
printf(" -v, --version Display version\n");
|
||||||
printf(" -h, --help Display help\n");
|
printf(" -h, --help Display help\n");
|
||||||
printf("\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");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ void wait_for_tty_device(void)
|
||||||
/* Exit upon ctrl-g + q sequence */
|
/* Exit upon ctrl-g + 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_G))
|
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T))
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -223,13 +223,13 @@ int connect_tty(void)
|
||||||
{
|
{
|
||||||
/* Input from stdin ready */
|
/* Input from stdin ready */
|
||||||
status = read(STDIN_FILENO, &c_stdin[0], 1);
|
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;
|
tainted = true;
|
||||||
|
|
||||||
/* Exit upon ctrl-g + q sequence */
|
/* Exit upon ctrl-g + 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_G))
|
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T))
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
/* Forward input to tty device */
|
/* Forward input to tty device */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue