vt

package
v3.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2025 The TCell Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use file except in compliance with the License. You may obtain a copy of the license at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package vt provides common definitions for VT derived terminals and applications. This includes the venerable VT100, XTerm, and newer emulators such as Kitty and the Windows Terminal.

Package vt provides common definitions for VT derived terminals and applications. This includes the venerable VT100, XTerm, and newer emulators such as Kitty and the Windows Terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Col

type Col int

Col indicates a column number (x position). We use zero based indices.

type Coord

type Coord struct {
	X Col // Column number, or X position.
	Y Row // Row number, or Y position.
}

Coord indicates a coordinate. This can also be used for window sizes.

type ModeStatus

type ModeStatus int

ModeStatus represents the status of the mode.

const (
	ModeNA        ModeStatus = 0 // Mode is not supported (or unknown)
	ModeOn        ModeStatus = 1 // Mode is on (e.g. via CSI-h)
	ModeOff       ModeStatus = 2 // Mode is off (e.g. via CSI-l)
	ModeOnLocked  ModeStatus = 3 // Mode is hardwired on
	ModeOffLocked ModeStatus = 4 // Mode is hardwired off
)

func (ModeStatus) Changeable

func (ms ModeStatus) Changeable() bool

Changeable indicates that the mode may be changed.

type PrivateMode

type PrivateMode int

PrivateMode describes a DEC Private Mode.

const (
	PmKeypad         PrivateMode = 1
	PmAutoMargin     PrivateMode = 7
	PmAltScreen      PrivateMode = 1049 // 47 and 1047 are alternates, but we use 1049
	PmBlinkCursor    PrivateMode = 12
	PmShowCursor     PrivateMode = 25
	PmMouseButton    PrivateMode = 1000
	PmMouseDrag      PrivateMode = 1002
	PmMouseMotion    PrivateMode = 1003
	PmFocusReports   PrivateMode = 1004
	PmMouseSgr       PrivateMode = 1006
	PmMouseSgrPixel  PrivateMode = 1016
	PmBracketedPaste PrivateMode = 2004
	PmSyncOutput     PrivateMode = 2026
	PmResizeReports  PrivateMode = 2048 // send in-band resize reports
)

func (PrivateMode) Disable

func (pm PrivateMode) Disable() string

Disable returns the string used to disable this private mode.

func (PrivateMode) Enable

func (pm PrivateMode) Enable() string

Enable returns the string used to enable this private mode.

func (PrivateMode) Query

func (pm PrivateMode) Query() string

Query returns the string used to query the state of this private mode.

func (PrivateMode) Reply

func (pm PrivateMode) Reply(status ModeStatus) string

Reply returns a string representing a query reply for the given mode and status.

type Row

type Row int

Row indicates a row number (y position). We use zero based indices, although the VT standard mostly communicates using 1-based offsets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL