read-key-termios

Crates.ioread-key-termios
lib.rsread-key-termios
version0.1.0
sourcesrc
created_at2024-07-10 22:39:24.824669
updated_at2024-07-10 22:39:24.824669
descriptionSimple key-reading using Termios from Libc. Unsafe for obvious reasons. Also doesn't work on Windows for obvious reasons.
homepagehttps://github.com/Aityz
repositoryhttps://github.com/Aityz/read-key-termios
max_upload_size
id1298864
size4,537
Aito Stukas (Aityz)

documentation

README

Read Key (Termios)

This is a tiny crate that adds functionality for entering and leaving raw mode on Linux. It is useful when you are making a small CLI application and you don't want to add a ton of dependencies.

Functions

init(): Enters raw mode by disabling ICANON and ECHO.
close(): Exits raw mode by enabling ICANON and ECHO.
read_key(fd: i32) -> u8: Reads a key from the FD specified.

Commit count: 2

cargo fmt