Module keypress

Module keypress 

Source

Modules§

event
A module to read events.

Enums§

Event
Represents an event.

Functions§

disable_raw_mode
Disable raw mode
enable_raw_mode
Enable raw mode
exit_if_kb_interrupt
If the event is a Ctrl+C (Keyboard Interrupt), exit immediately.
exit_raw_mode
Disable raw mode and exit the process
read
Get an Event. When raw mode is disabled, the input will only be registered after enter is pressed. Call enable_raw_mode() at the beginning of the program to avoid having to press enter
read_and_handle_kb_interrupt
Get an input, with or without blocking, and exit if the input is a keyboard interrupt (Ctrl+C)
read_non_blocking
Get an Event, without blocking. When raw mode is disabled, the input will only be registered after enter is pressed. Call enable_raw_mode() at the beginning of the program to avoid having to press enter