alt_screen(
opts) ->state
Enter the alternate screen with KKBP and bracketed paste enabled
Saves the cursor position, switches to the alt screen, enables KKBP
and bracketed paste, and hides the cursor. Returns a state object
with a state:done() method that restores everything.
opts.query_cursor (default true): when false, skips the ESC[6n
cursor-position query. The query reads stdin through buffered stdio,
so callers that then read input via a raw lev.fd_reader must pass
false or those reads will miss buffer-swallowed keystrokes.