Merge pull request #56 from kilobyte/master

'ctrl-t b' to send serial break.
This commit is contained in:
Martin Lund 2017-04-10 14:23:47 +02:00 committed by GitHub
commit f825975266
3 changed files with 7 additions and 0 deletions

View file

@ -70,6 +70,8 @@ Display help.
In session, the following key sequences are intercepted as tio commands:
.IP "\fBctrl-t ?"
List available key commands
.IP "\fBctrl-t b"
Send serial break (triggers SysRq on Linux, etc.)
.IP "\fBctrl-t c"
Show configuration (baudrate, databits, etc.)
.IP "\fBctrl-t l"

View file

@ -23,6 +23,7 @@
#define TTY_H
#define KEY_QUESTION 0x3f
#define KEY_B 0x62
#define KEY_C 0x63
#define KEY_L 0x6C
#define KEY_Q 0x71

View file

@ -76,6 +76,7 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
case KEY_QUESTION:
tio_printf("Key commands:");
tio_printf(" ctrl-t ? List available key commands");
tio_printf(" ctrl-t b Send break");
tio_printf(" ctrl-t c Show configuration");
tio_printf(" ctrl-t l Clear screen");
tio_printf(" ctrl-t q Quit");
@ -83,6 +84,9 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
tio_printf(" ctrl-t t Send ctrl-t key code");
*forward = false;
break;
case KEY_B:
tcsendbreak(fd, 0);
break;
case KEY_C:
tio_printf("Configuration:");
tio_printf(" TTY device: %s", option.tty_device);