'ctrl-t b' to send serial break.

This commit is contained in:
Adam Borowski 2017-04-10 01:05:40 +02:00
parent 02d2c0ca21
commit 74a543b263
3 changed files with 7 additions and 0 deletions

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);