pub struct SessionOptions {
pub alternate_screen: bool,
pub mouse: bool,
pub bracketed_paste: bool,
pub output: Output,
pub legacy_keys: bool,
pub backend: BackendKind,
pub synchronized_output: Option<bool>,
pub all_keys: bool,
}Expand description
What a session turns on.
Fields§
§alternate_screen: boolTake over the whole screen, and give it back as it was on exit. Without it, components paint inline, below the cursor.
mouse: boolReport mouse clicks and the wheel.
bracketed_paste: boolDeliver pasted text as one Event::Paste.
output: OutputWhere to paint.
legacy_keys: boolRead keys as a legacy terminal sends them, even from a terminal with
the kitty keyboard protocol. Without it, a terminal that answers the
protocol’s query has it turned on: Ctrl+I and Tab are told apart
(see Key::matches), and key releases arrive
as Event::KeyUp (with crossterm; see BackendKind).
backend: BackendKindThe library that drives the terminal: crossterm unless this says otherwise.
synchronized_output: Option<bool>Write each frame as one synchronized update (DEC private mode 2026):
Some(true) always, Some(false) never. None, the default, leaves
it to RICH_SYNC_OUTPUT (0 off, 1 on) and then to the terminal,
which is asked in the kitty keyboard protocol’s start-up query. A
session that asks nothing (legacy_keys, the
termion backend, standard output not a terminal) leaves it off
unless this or the environment turns it on.
all_keys: boolWith the kitty keyboard protocol, have every key reported as an
escape code: releases then arrive for text keys too (letters,
Space, Enter), and modifier keys pressed on their own arrive as
KeyCode::Modifier, as a game wants
them. Off by default: typed text then arrives as a base key and the
modifiers held, which loses characters an input method composes.
crossterm only (termwiz reads no releases); see
Session::releases_reported.
Trait Implementations§
Source§impl Clone for SessionOptions
impl Clone for SessionOptions
impl Copy for SessionOptions
Source§impl Debug for SessionOptions
impl Debug for SessionOptions
Source§impl Default for SessionOptions
impl Default for SessionOptions
impl Eq for SessionOptions
Source§impl PartialEq for SessionOptions
impl PartialEq for SessionOptions
impl StructuralPartialEq for SessionOptions
Auto Trait Implementations§
impl Freeze for SessionOptions
impl RefUnwindSafe for SessionOptions
impl Send for SessionOptions
impl Sync for SessionOptions
impl Unpin for SessionOptions
impl UnsafeUnpin for SessionOptions
impl UnwindSafe for SessionOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.