etch/erlang/input
Values
pub fn get_cursor_position() -> Result(
#(Int, Int),
event.EventError,
)
Returns cursor position. This function shouldn’t be called in a tight loop. It’s fine to call it when responding to specific user input (e.g., after a key press), but avoid calling it on every loop iteration.
pub fn get_keyboard_enhancement_flags() -> Result(
List(event.KeyboardEnhancementFlag),
event.EventError,
)
Get keyboard enhancement flags. See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement This function shouldn’t be called in a tight loop. It’s fine to call it when responding to specific user input (e.g., after a key press), but avoid calling it on every loop iteration.
pub fn init_event_server() -> Nil
Initializes the event server responsible for listening for events.
pub fn poll(
timeout: Int,
) -> option.Option(Result(event.Event, event.EventError))
pub fn read() -> option.Option(
Result(event.Event, event.EventError),
)