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
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue