germinal
A module containing functions that used to control terminal and read event.
Functions
pub fn enable_raw_mode() -> Result(Nil, String)
Enables the raw mode.
Not disabling afterwards may cause weird behaviour of the terminal.
pub fn poll(timeout_ms: Int) -> Result(Bool, String)
Checks if there is an Event available. Returns Ok(true) if an Event is available otherwise it returns Ok(false). Ok(true) guarantees that subsequent call to the read function won’t block.
This function need raw mode to work properly.
It can only be used in a single thread.