I use minicom to communicate, via serial line, with a device that dumps the characters received in hexadecimal. I do this to see the escape codes for some keys. I tried minicom once with VT102 terminal emulation and once ANSI.
For both VT102 and ANSI, the arrow keys correspond to
Up: Esc [ A
Down: Esc [ B
Right: Esc [ C
Left: Esc [ D
This is matches what I find in several websites, for example VT102 User Guide
I tried other keys for which I cannot find any reference throughout the web:
VT102 ANSI
Home: Esc [ 1 ~ Esc [ H
End: Esc O F Esc O F
Insert: Esc [ 2 ~ Esc [ @
Are these codes standard? And what standard? where can I find a match on the internet?
If I try by command line (xfce-terminal), pressing Home, End and Insert in this order:
$ cat | hexdump -C
^[[H^[[F^[[2~00000000 1b 5b 48 1b 5b 46 1b 5b 32 7e |.[H.[F.[2~|
It seems that Home is equal to Minicom ANSI sequence, End change the 'O' into '[', and Insert is equal to Minicom VT102 escape sequence.
The same running GtkTerm.
I tried also with TeraTerm on Windows, with still different results.
Summarising
Minicom VT102 Minicom ANSI xfce-terminal & GtkTerm TeraTerm VT100/VT102
Home: Esc [ 1 ~ Esc [ H Esc [ H Esc [ 1 ~
End: Esc O F Esc O F Esc [ F Esc [ 4 ~
Insert: Esc [ 2 ~ Esc [ @ Esc [ 2 ~ Esc [ 2 ~