Crate input

Source
Expand description

Git Interactive Rebase Tool - Input Module

§Description

This module is used to handle working with input events.

§Test Utilities

To facilitate testing the usages of this crate, a set of testing utilities are provided. Since these utilities are not tested, and often are optimized for developer experience than performance should only be used in test code.

Modules§

testutil
Utilities for writing tests that interact with input events.

Structs§

EventHandler
A handler for reading and processing events.
InputOptions
Represents options for parsing input events.
KeyBindings
Represents a mapping between an input event and an action.
KeyEvent
Represents a key event.
KeyModifiers
Represents key modifiers (shift, control, alt, etc.).
MouseEvent
Represents a mouse event.
State
Input thread state.
Thread
A thread for reading and handling input events.

Enums§

Event
An event, either from an input device, system change or action event.
KeyCode
Represents a key.
MouseEventKind
A mouse event kind.
RawEvent
Represents an event.
StandardEvent
Represents an event that is not tied directly to a user input device.

Constants§

THREAD_NAME
The name of the input thread.

Traits§

CustomEvent
A custom event compatible enum.
CustomKeybinding
A custom keybindings compatible struct.
EventReaderFn
Function that returns a event

Functions§

map_keybindings
Map a keybinding to a list of events.
read_event
Read the next input event from the terminal interface.