Arlecchino.Input
Classes
| Type | Summary |
|---|---|
KeyText | Turns a key press into the character it should type. Take it as a constructor parameter instead of reading KeyPress.Character yourself — that is what keeps filters and shortcuts working on a non-latin layout. |
TerminalInputReader | Turns what the terminal reports into keys and mouse events, reading an escape together with what follows it. Anything that turns out not to be a sequence is replayed key by key, after a short wait. |
Structs
| Type | Summary |
|---|---|
KeyBinding | A key plus the exact modifiers that must be held with it, so Ctrl+S never fires on a bare S. It is added to with KeyBinding.AddAlternative and turned into a chord with KeyBinding.ThenKey. |
KeyPress | One key press, as the framework hands it to a view. It is ConsoleKeyInfo with room for Command, which that type has nowhere to put. |
KeyStroke | One key and the modifiers held with it, which is the smallest thing a binding can be made of. A KeyBinding is one of these plus its alternatives and its finishing key. |
MouseEvent | A mouse report from the terminal. Coordinates are frame cells — the same ones Surface.WriteAt and SurfaceRegion.Contains use, so hit-testing is comparing numbers. |
Enums
| Type | Summary |
|---|---|
KeyModifiers | Modifiers held with a key. The three the console knows about keep the values ConsoleModifiers gives them, so the two agree bit by bit; KeyModifiers.Super is the one the console has no room for — Command on a Mac, the Windows key elsewhere. |
MouseAction | What the mouse did. |
MouseButton | Which button an event belongs to. |
TextInputMode | How a key press becomes a character, which decides what happens on a non-latin layout. |