May 26, 2018
Terminal-emulator state machine
TSM is a state machine for DEC VT100-VT520 compatible terminal emulators. It tries to support all common standards while keeping compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.
TSM itself does not provide any rendering nor window management. It is a simple plain state machine without any external dependencies. It can be used to implement terminal emulators, but also to implement other applications that need to interpret terminal escape sequences.
This library is very similar to libvte of the gnome project. However, libvte is highly bound to GTK+, which makes it unsuitable for non-graphics projects that need to parse escape sequences. Instead, TSM tries to restrict its API to terminal emulation only. Furthermore, TSM does not try to establish a new terminal emulation standard, but instead keeps compatibility as close to xterm as possible. This is why the TERM variable can be set to xterm-color256 with any TSM based terminal emulator.