mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Merge pull request #17 from jwilk/ctrl-g
Completed the ^g to ^t transition
This commit is contained in:
commit
fb7e9fab5f
1 changed files with 3 additions and 3 deletions
|
|
@ -73,7 +73,7 @@ void wait_for_tty_device(void)
|
|||
/* Read one character */
|
||||
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[1] = c_stdin[0];
|
||||
if ((c_stdin[1] == KEY_Q) && (c_stdin[2] == KEY_CTRL_T))
|
||||
|
|
@ -210,7 +210,7 @@ int connect_tty(void)
|
|||
if (option.log)
|
||||
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;
|
||||
} else
|
||||
{
|
||||
|
|
@ -226,7 +226,7 @@ int connect_tty(void)
|
|||
if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T))
|
||||
tainted = true;
|
||||
|
||||
/* Exit upon ctrl-g + q sequence */
|
||||
/* Exit upon ctrl-t + 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_T))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue