Documentation
¶
Overview ¶
Package xterminal provides functions to change termios or console attributes and restore them later on. It supports Unix and Windows.
This does the same thing as x/crypto/ssh/terminal on Linux. On Windows, it sets the same console modes as the terminal package but also sets `ENABLE_VIRTUAL_TERMINAL_INPUT` and `ENABLE_VIRTUAL_TERMINAL_PROCESSING` to allow for VT100 sequences in the console. This is important, otherwise Linux apps (with colors or ncurses) that are run through SSH or wsep get garbled in a Windows console.
More details can be found out about Windows console modes here: https://docs.microsoft.com/en-us/windows/console/setconsolemode
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorEnabled ¶
ColorEnabled returns true on Linux if handle is a terminal.
func ResizeEvents ¶
func ResizeEvents(ctx context.Context, termFD uintptr) chan ResizeEvent
ResizeEvents sends terminal resize events.
Types ¶
type ResizeEvent ¶
ResizeEvent describes the new terminal dimensions following a resize.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State differs per-platform.
func MakeOutputRaw ¶
MakeOutputRaw does nothing on non-Windows platforms.