Skip to content

Interface ITerminalInput

Where a terminal’s input goes, as events. The session produces them from the keyboard and the pointer. DarkEffekt.Terminal.AnsiInputEncoder turns them into the bytes a host reads; a surface program takes them as they are.

Declaration
public interface ITerminalInput

A non-text key: arrows, function keys, Enter, Tab, and the rest of DarkEffekt.Terminal.TermKey.

Declaration
void OnKey(in TermKeyEvent e)
Type Name
DarkEffekt.Terminal.TermKeyEvent e

A typed character, or a letter held with Ctrl or Alt.

Declaration
void OnChar(char c, TermModifiers modifiers)
Type Name
System.Char c
DarkEffekt.Terminal.TermModifiers modifiers

Text pasted from the clipboard.

Declaration
void OnPaste(string text)
Type Name
System.String text
Declaration
void OnMouse(in TermMouseEvent e)
Type Name
DarkEffekt.Terminal.TermMouseEvent e

The terminal gained or lost keyboard focus.

Declaration
void OnFocus(bool focused)
Type Name
System.Boolean focused