CommandModeHandler class Input

Handles input in a modal command mode, similar to a text editor's command line.

This InputHandler listens for a command mode trigger (the : character), then accumulates user input until execution or cancellation.

It supports:

  • Entering command mode by typing :
  • Executing commands by pressing Enter (e.g., :q to exit)
  • Handling backspace to edit the command buffer
  • Exiting command mode on command execution or Ctrl+C

Usage

Typical usage involves feeding input events to this handler when command mode functionality is desired.

Implemented types

Constructors

CommandModeHandler.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

executeCommand() ResponseInput
Executes the buffered command and returns a response indicating any triggered commands.
handleInput(InputEvent event) ResponseInput
Processes an input event and updates command mode state accordingly.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited