diff --git a/man/tio.1 b/man/tio.1 index c9e7ca5..566e22c 100644 --- a/man/tio.1 +++ b/man/tio.1 @@ -117,6 +117,8 @@ Quit Show TX/RX statistics .IP "\fBctrl-t t" Send ctrl-t key code +.IP "\fBctrl-t v" +Show version .SH "EXAMPLES" .TP diff --git a/src/include/tio/tty.h b/src/include/tio/tty.h index ee8894e..6226263 100644 --- a/src/include/tio/tty.h +++ b/src/include/tio/tty.h @@ -33,6 +33,7 @@ #define KEY_T 0x74 #define KEY_SHIFT_T 0x54 #define KEY_CTRL_T 0x14 +#define KEY_V 0x76 #define NORMAL 0 #define HEX 1 diff --git a/src/tty.c b/src/tty.c index 9c70eec..bee6f9f 100644 --- a/src/tty.c +++ b/src/tty.c @@ -109,6 +109,7 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c tio_printf(" ctrl-t s Show statistics"); tio_printf(" ctrl-t t Send ctrl-t key code"); tio_printf(" ctrl-t T Toggle timestamps"); + tio_printf(" ctrl-t v Show version"); break; case KEY_B: @@ -178,6 +179,10 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c option.timestamp = !option.timestamp; break; + case KEY_V: + tio_printf("tio v%s", VERSION); + break; + default: /* Ignore unknown ctrl-t escaped keys */ break;