mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
'ctrl-t b' to send serial break.
This commit is contained in:
parent
02d2c0ca21
commit
74a543b263
3 changed files with 7 additions and 0 deletions
|
|
@ -70,6 +70,8 @@ Display help.
|
||||||
In session, the following key sequences are intercepted as tio commands:
|
In session, the following key sequences are intercepted as tio commands:
|
||||||
.IP "\fBctrl-t ?"
|
.IP "\fBctrl-t ?"
|
||||||
List available key commands
|
List available key commands
|
||||||
|
.IP "\fBctrl-t b"
|
||||||
|
Send serial break (triggers SysRq on Linux, etc.)
|
||||||
.IP "\fBctrl-t c"
|
.IP "\fBctrl-t c"
|
||||||
Show configuration (baudrate, databits, etc.)
|
Show configuration (baudrate, databits, etc.)
|
||||||
.IP "\fBctrl-t l"
|
.IP "\fBctrl-t l"
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#define TTY_H
|
#define TTY_H
|
||||||
|
|
||||||
#define KEY_QUESTION 0x3f
|
#define KEY_QUESTION 0x3f
|
||||||
|
#define KEY_B 0x62
|
||||||
#define KEY_C 0x63
|
#define KEY_C 0x63
|
||||||
#define KEY_L 0x6C
|
#define KEY_L 0x6C
|
||||||
#define KEY_Q 0x71
|
#define KEY_Q 0x71
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
|
||||||
case KEY_QUESTION:
|
case KEY_QUESTION:
|
||||||
tio_printf("Key commands:");
|
tio_printf("Key commands:");
|
||||||
tio_printf(" ctrl-t ? List available 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 c Show configuration");
|
||||||
tio_printf(" ctrl-t l Clear screen");
|
tio_printf(" ctrl-t l Clear screen");
|
||||||
tio_printf(" ctrl-t q Quit");
|
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");
|
tio_printf(" ctrl-t t Send ctrl-t key code");
|
||||||
*forward = false;
|
*forward = false;
|
||||||
break;
|
break;
|
||||||
|
case KEY_B:
|
||||||
|
tcsendbreak(fd, 0);
|
||||||
|
break;
|
||||||
case KEY_C:
|
case KEY_C:
|
||||||
tio_printf("Configuration:");
|
tio_printf("Configuration:");
|
||||||
tio_printf(" TTY device: %s", option.tty_device);
|
tio_printf(" TTY device: %s", option.tty_device);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue