Skip to main content

Module input

Module input 

Source
Expand description

Input handling for interactive terminal applications.

Provides key event types and an input reader that wraps crossterm.

Structs§

Key
A key press event.
KeyMatcher
Builder for matching keys and executing handlers.

Enums§

Arrow
Arrow key direction.

Traits§

InputHandler
Input handler that can be used with App::run.

Functions§

match_key
Helper function to create a KeyMatcher.
poll_key
Polls for keyboard input with a timeout. Returns Some(Key) if a key was pressed, None if timeout.
read_key
Blocks until a key is pressed.