Hex1b.Input
Assembly: Hex1b.dll
Classes
CharacterBinding
Represents a binding that matches text input based on a predicate. Used for handling arbitrary printable text input in widgets like TextBox. Supports both single characters and multi-char sequences like emojis.
public sealed class CharacterBindingCharacterStepBuilder
Fluent builder for constructing character/text bindings.
public sealed class CharacterStepBuilderChordTrie
A trie (prefix tree) for efficient chord lookup. Each node represents a key step; leaf nodes contain actions.
public sealed class ChordTrieDragBinding
A binding that initiates a drag operation on mouse down. The factory is called at drag start and returns a DragHandler that receives subsequent events.
public sealed class DragBindingDragHandler
A handler for drag operations, returned by a drag binding's factory. Receives move and end events for the duration of the drag.
public sealed class DragHandlerDragStepBuilder
Fluent builder for constructing a drag binding.
public sealed class DragStepBuilderFocusRing
Maintains a flat ring of all focusable nodes from the current render. Built after each render by traversing GetFocusableNodes() on the root. Provides efficient navigation between focusables regardless of tree structure. Also tracks which node (if any) has captured all input.
public sealed class FocusRingHex1bEvent
Base class for all Hex1b events. Events are categorized into:
- Keyboard events: Routed to focused node via InputRouter
- System events: Handled by app (resize, etc.)
- Terminal events: Handled by app for terminal capability detection
public abstract record Hex1bEvent : IEquatable<Hex1bEvent>Hex1bKeyEvent
A keyboard input event that gets routed to the focused node.
public sealed record Hex1bKeyEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bKeyEvent>Hex1bMouseEvent
A mouse input event.
public sealed record Hex1bMouseEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bMouseEvent>Hex1bPasteEvent
Event emitted when a bracketed paste sequence (ESC[200~ ... ESC[201~) is detected. The context provides streaming access to the paste data.
public sealed record Hex1bPasteEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bPasteEvent>Hex1bResizeEvent
A terminal resize event. Handled by the app to trigger re-layout.
public sealed record Hex1bResizeEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bResizeEvent>Hex1bTerminalEvent
A terminal capability response event (e.g., DA1 response for Sixel detection). Handled by the app to update terminal capabilities.
public sealed record Hex1bTerminalEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bTerminalEvent>InputBinding
Represents a key binding that matches a sequence of key steps and executes an action. Supports both single-key bindings and multi-step chords.
public sealed class InputBindingInputBindingActionContext
Context passed to input binding action handlers and widget event handlers. Provides app-level services for focus navigation, cancellation, and other common operations.
public sealed class InputBindingActionContextInputBindingsBuilder
Fluent builder for constructing input bindings for a widget. Pre-populated with widget defaults, allowing inspection and modification.
public sealed class InputBindingsBuilderInputResultExtensions
Extension methods for InputResult.
public static class InputResultExtensionsInputRouter
Routes input through the node tree to the focused node using layered chord tries.
public static class InputRouterInputRouterState
Holds the chord state for an input router instance. Each Hex1bApp has its own state, ensuring test isolation and multi-app support.
public sealed class InputRouterStateKeyMapper
Maps between System.ConsoleKey and Hex1bKey. This centralizes the dependency on System.Console types.
public static class KeyMapperKeyStepBuilder
Fluent builder for constructing key steps in an input binding. Supports chaining modifiers, keys, and multi-step chords.
public sealed class KeyStepBuilderMouseBinding
A binding that triggers an action on a mouse event.
public sealed class MouseBindingMouseParser
Parses mouse escape sequences from the terminal. Supports SGR extended mouse mode (\e[<...M/m) which is the most portable.
public static class MouseParserMouseStepBuilder
Fluent builder for constructing a mouse binding.
public sealed class MouseStepBuilderPasteContext
Provides streaming access to bracketed paste data. Created when a paste start marker (ESC[200~) is detected, data is written as it arrives, and completed when the end marker (ESC[201~) is received.
public sealed class PasteContext : IAsyncDisposableStructs
ActionId
A strongly typed identifier for a rebindable action. Used to tag keybindings so they can be referenced by action rather than by key.
public readonly record struct ActionId : IEquatable<ActionId>ChordLookupResult
Result of looking up a key step in a chord trie.
public readonly struct ChordLookupResultKeyStep
Represents a single key press with modifiers in a key binding sequence.
public readonly record struct KeyStep : IEquatable<KeyStep>Enums
Hex1bKey
Platform-independent key identifiers for Hex1b input handling. This abstraction removes the dependency on System.ConsoleKey.
public enum Hex1bKeyHex1bModifiers
Modifier keys for input events.
[Flags]
public enum Hex1bModifiersInputResult
The result of input handling, indicating whether the input was consumed.
public enum InputResultMouseAction
The type of mouse action.
public enum MouseActionMouseButton
The type of mouse button involved in a mouse event.
public enum MouseButton