Table of Contents

Class InputCoordinator

Namespace
SharpConsoleUI.Input
Assembly
SharpConsoleUI.dll

Coordinates all input processing for the console window system. Handles keyboard input, mouse events, window dragging, and resizing operations. Extracted from ConsoleWindowSystem to reduce complexity and improve maintainability.

public class InputCoordinator
Inheritance
InputCoordinator
Inherited Members

Constructors

InputCoordinator(IConsoleDriver, InputStateService, WindowStateService, ILogService, ConsoleWindowSystem)

Initializes a new instance of the InputCoordinator class.

public InputCoordinator(IConsoleDriver consoleDriver, InputStateService inputStateService, WindowStateService windowStateService, ILogService logService, ConsoleWindowSystem context)

Parameters

consoleDriver IConsoleDriver

Console driver for event subscription.

inputStateService InputStateService

Service managing keyboard input state.

windowStateService WindowStateService

Service managing window drag/resize state.

logService ILogService

Logging service for debug output.

context ConsoleWindowSystem

Window system context for operations requiring access to window collection and rendering.

Methods

ProcessInput()

Processes all pending keyboard input from the input queue. Routes input to appropriate handlers based on key combinations and active window state.

public void ProcessInput()

RegisterEventHandlers(EventHandler<ConsoleKeyInfo>)

Registers event handlers for mouse and keyboard input. Must be called after ConsoleWindowSystem initialization.

public void RegisterEventHandlers(EventHandler<ConsoleKeyInfo> keyPressedHandler)

Parameters

keyPressedHandler EventHandler<ConsoleKeyInfo>

UnregisterEventHandlers(EventHandler<ConsoleKeyInfo>)

Unregisters event handlers for mouse and keyboard input. Must be called during ConsoleWindowSystem cleanup.

public void UnregisterEventHandlers(EventHandler<ConsoleKeyInfo> keyPressedHandler)

Parameters

keyPressedHandler EventHandler<ConsoleKeyInfo>