| Crates.io | read-key-termios |
| lib.rs | read-key-termios |
| version | 0.1.0 |
| created_at | 2024-07-10 22:39:24.824669+00 |
| updated_at | 2024-07-10 22:39:24.824669+00 |
| description | Simple key-reading using Termios from Libc. Unsafe for obvious reasons. Also doesn't work on Windows for obvious reasons. |
| homepage | https://github.com/Aityz |
| repository | https://github.com/Aityz/read-key-termios |
| max_upload_size | |
| id | 1298864 |
| size | 4,537 |
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.
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.