useRawMode

inline fun <T> Terminal.useRawMode(block: (Terminal) -> T): T(source)

Safely enters raw mode, executes the block, and ensures raw mode is exited even if an exception occurs.