mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Added 'ctrl-t ?' to list available commands
This commit is contained in:
parent
66d5cf5456
commit
59a537f7dd
3 changed files with 14 additions and 2 deletions
|
|
@ -61,12 +61,14 @@ Display help.
|
||||||
.PP
|
.PP
|
||||||
.TP 16n
|
.TP 16n
|
||||||
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 ?"
|
||||||
|
List available key commands
|
||||||
.IP "\fBctrl-t i"
|
.IP "\fBctrl-t i"
|
||||||
Show session settings information (baudrate, databits, etc.)
|
Show settings information (baudrate, databits, etc.)
|
||||||
.IP "\fBctrl-t q"
|
.IP "\fBctrl-t q"
|
||||||
Quit
|
Quit
|
||||||
.IP "\fBctrl-t s"
|
.IP "\fBctrl-t s"
|
||||||
Show session statistics (total number of bytes transmitted/received)
|
Show statistics (total number of bytes transmitted/received)
|
||||||
.IP "\fBctrl-t t"
|
.IP "\fBctrl-t t"
|
||||||
Send ctrl-t key code
|
Send ctrl-t key code
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#ifndef TTY_H
|
#ifndef TTY_H
|
||||||
#define TTY_H
|
#define TTY_H
|
||||||
|
|
||||||
|
#define KEY_QUESTION 0x3f
|
||||||
#define KEY_I 0x69
|
#define KEY_I 0x69
|
||||||
#define KEY_Q 0x71
|
#define KEY_Q 0x71
|
||||||
#define KEY_S 0x73
|
#define KEY_S 0x73
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,15 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
|
||||||
{
|
{
|
||||||
switch (input_char)
|
switch (input_char)
|
||||||
{
|
{
|
||||||
|
case KEY_QUESTION:
|
||||||
|
tio_printf("Key commands:");
|
||||||
|
tio_printf(" ctrl-t ? List available key commands");
|
||||||
|
tio_printf(" ctrl-t i Show settings information");
|
||||||
|
tio_printf(" ctrl-t q Quit");
|
||||||
|
tio_printf(" ctrl-t s Show statistics");
|
||||||
|
tio_printf(" ctrl-t t Send ctrl-t key code");
|
||||||
|
*forward = false;
|
||||||
|
break;
|
||||||
case KEY_I:
|
case KEY_I:
|
||||||
tio_printf("Settings information:");
|
tio_printf("Settings information:");
|
||||||
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