hs-term-emulator-0.1.0.0: Terminal Emulator written in 100% Haskell
Safe HaskellNone
LanguageHaskell2010

System.Terminal.Emulator.Parsing.Types

Documentation

data SingleCharacterFunction Source #

Constructors

Control_Bell

BEL Bell (BEL is Ctrl-G).

Control_Backspace

BS Backspace (BS is Ctrl-H).

Control_CarriageReturn

CR Carriage Return (CR is Ctrl-M).

Control_ReturnTerminalStatus

ENQ Return Terminal Status (ENQ is Ctrl-E). Default response is an empty string

Control_FormFeed

FF Form Feed or New Page (NP ). (FF is Ctrl-L). FF is treated the same as LF .

Control_LineFeed

LF Line Feed or New Line (NL). (LF is Ctrl-J).

Control_SwitchToStandardCharacterSet

SI Switch to Standard Character Set (Ctrl-O is Shift In or LS0). This invokes the G0 character set (the default) as GL. VT200 and up implement LS0.

Control_SwitchToAlternateCharacterSet

SO Switch to Alternate Character Set (Ctrl-N is Shift Out or LS1). This invokes the G1 character set as GL. VT200 and up implement LS1.

Control_Tab

TAB Horizontal Tab (HTS is Ctrl-I).

Control_VerticalTab

VT Vertical Tab (VT is Ctrl-K). This is treated the same as LF.

data EscapeSequence Source #

Constructors

Esc_ReverseIndex

ESC M Reverse Index (RI is 0x8d).

Esc_RIS

ESC c Reset terminal to initial state (RIS)

Esc_DECPAM

ESC = Application Keypad (DECPAM)

Esc_DECPNM

ESC > Set numeric keypad mode (DECPNM)

ESC_SetG0CharacterSet !Text

ESC ( Designate G0 Character Set, VT100, ISO 2022.

Esc_CSI !ControlSequenceIntroducer 
Esc_OSC !OperatingSystemCommand 

data ControlSequenceIntroducer Source #

Constructors

CSI_CharacterPositionAbsolute !Int

CSI Ps ` Character Position Absolute [column] (default = [row,1]) (HPA).

CSI_CharacterPositionRelative !Int

CSI Ps a Character Position Relative [columns] (default = [row,col+1]) (HPR).

CSI_CursorUp !Int

CSI Ps A Cursor Up Ps Times (default = 1) (CUU).

CSI_CursorDown !Int

CSI Ps B Cursor Down Ps Times (default = 1) (CUD).

CSI_CursorForward !Int

CSI Ps C Cursor Forward Ps Times (default = 1) (CUF).

CSI_CursorBack !Int

CSI Ps D Cursor Backward Ps Times (default = 1) (CUB).

CSI_EraseInLine !EraseInLineParam

CSI Ps K Erase in Line (EL), VT100.

CSI_InsertBlankCharacters !Int

CSI Ps @ Insert Ps (Blank) Character(s) (default = 1) (ICH)

CSI_InsertBlankLines !Int

CSI Ps L Insert Ps Line(s) (default = 1) (IL)

CSI_DeleteChars !Int

CSI Ps P Delete Ps Character(s) (default = 1) (DCH).

CSI_DeleteLines !Int

CSI Ps M Delete Ps Line(s) (default = 1) (DL).

CSI_CursorCharacterAbsolute !Int

CSI Ps G Cursor Character Absolute [column] (default = [row,1]) (CHA).

CSI_CursorPosition !Int !Int

CSI Ps ; Ps H Cursor Position [row;column] (default = [1,1]) (CUP).

CSI_HorizontalVerticalPosition !Int !Int

CSI Ps ; Ps f Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP).

CSI_LinePositionAbsolute !Int

CSI Ps d Line Position Absolute [row] (default = [1,column]) (VPA).

CSI_LinePositionRelative !Int

CSI Ps e Line Position Relative [rows] (default = [row+1,column]) (VPR).

CSI_ScrollUp !Int

CSI Ps S Scroll up Ps lines (default = 1) (SU), VT420, ECMA-48.

CSI_ScrollDown !Int

CSI Ps T Scroll down Ps lines (default = 1) (SD), VT420.

CSI_EraseInDisplay !EraseInDisplayParam

CSI Ps J Erase in Display (ED), VT100

CSI_EraseCharacters !Int

CSI Ps X Erase Ps Character(s) (default = 1) (ECH).

CSI_WindowManipulation !WindowManipulation

CSI Ps ; Ps ; Ps t Window manipulation (XTWINOPS), dtterm, extended by xterm. These controls may be disabled using the allowWindowOps resource.

CSI_DeviceStatusReport !DeviceStatusReport

CSI Ps n Device Status Report (DSR).

CSI_SoftTerminalReset

CSI ! p Soft terminal reset (DECSTR), VT220 and up.

CSI_SetMode !Mode

CSI Pm h Set Mode (SM).

CSI_ResetMode !Mode

CSI Pm l Reset Mode (RM).

CSI_SendDeviceAttributes

CSI Ps c Send Device Attributes (Primary DA).

CSI_SendDeviceAttributesSecondary !SendDeviceAttributesSecondary

CSI > Ps c Send Device Attributes (Secondary DA).

CSI_RequestDECPrivateMode !Int

CSI ? Ps $ p Request DEC private mode (DECRQM).

CSI_DECSTBM !(Maybe Int) !(Maybe Int)

Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM)

CSI_DECSET !DECPrivateMode

DEC Private Mode Set

CSI_DECSET_Unknown !Int

Unknown DECSET (DEC Private Mode Set) code

CSI_DECRST !DECPrivateMode

DEC Private Mode Reset

CSI_DECRST_Unknown !Int

Unknown DECRST (DEC Private Mode Reset) code

CSI_SGR !(Vector SGR) 

data EraseInDisplayParam Source #

Constructors

EraseBelow

Ps = 0 Erase Below (default).

EraseAbove

Ps = 1 Erase Above.

EraseAll

Ps = 2 Erase All.

EraseSavedLines

Ps = 3 Erase Saved Lines, xterm.

data WindowManipulation Source #

Constructors

SaveIconAndWindowTitleOnStack

22;0 Save xterm icon and window title on stack.

RestoreIconAndWindowTitleOnStack

23;0 Restore xterm icon and window title from stack.

data DeviceStatusReport Source #

Constructors

StatusReport

Status Report. Result (OK) is CSI 0 n

ReportCursorPosition

Report Cursor Position (CPR) [row;column]. Result is CSI r ; c R

data Mode Source #

Constructors

KeyboardActionMode

Keyboard Action Mode (KAM)

InsertReplaceMode

Insert/Replace Mode (IRM)

SendReceive

Send/receive (SRM)

AutomaticNewlineNormalLinefeed

Automatic Newline / Normal Linefeed (LNM).

Instances

Instances details
Eq Mode Source # 
Instance details

Defined in System.Terminal.Emulator.Parsing.Types

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Show Mode Source # 
Instance details

Defined in System.Terminal.Emulator.Parsing.Types

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

data OperatingSystemCommand Source #

Constructors

OSC_SetTitle

Change Icon Name and Window Title

Fields

  • !Bool

    Set icon name to the string

  • !Bool

    Set window title to the string

  • !Text

    The string that should be used for the title

OSC_ChangeTextForegroundColor !Text

Change VT100 text foreground color

OSC_RequestTextForegroundColor

Request VT100 text foreground color

OSC_ChangeTextBackgroundColor !Text

Change VT100 text background color

OSC_RequestTextBackgroundColor

Request VT100 text background color

OSC_ResetTextCursorColor

Ps = 112 Reset text cursor color.

between :: Ord a => a -> (a, a) -> Bool Source #