Struct crossterm::event::PushKeyboardEnhancementFlags
source · pub struct PushKeyboardEnhancementFlags(pub KeyboardEnhancementFlags);
Expand description
A command that enables the kitty keyboard protocol, which adds extra information to keyboard events and removes ambiguity for modifier keys.
It should be paired with PopKeyboardEnhancementFlags
at the end of execution.
Example usage:
use std::io::{Write, stdout};
use crossterm::execute;
use crossterm::event::{
KeyboardEnhancementFlags,
PushKeyboardEnhancementFlags,
PopKeyboardEnhancementFlags
};
let mut stdout = stdout();
execute!(
stdout,
PushKeyboardEnhancementFlags(
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
)
);
// ...
execute!(stdout, PopKeyboardEnhancementFlags);
Note that, currently, only the following support this protocol:
Tuple Fields§
§0: KeyboardEnhancementFlags
Trait Implementations§
source§impl Clone for PushKeyboardEnhancementFlags
impl Clone for PushKeyboardEnhancementFlags
source§fn clone(&self) -> PushKeyboardEnhancementFlags
fn clone(&self) -> PushKeyboardEnhancementFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Command for PushKeyboardEnhancementFlags
impl Command for PushKeyboardEnhancementFlags
source§fn write_ansi(&self, f: &mut impl Write) -> Result
fn write_ansi(&self, f: &mut impl Write) -> Result
Write an ANSI representation of this command to the given writer.
An ANSI code can manipulate the terminal by writing it to the terminal buffer.
However, only Windows 10 and UNIX systems support this. Read more
source§fn is_ansi_code_supported(&self) -> bool
fn is_ansi_code_supported(&self) -> bool
Returns whether the ANSI code representation of this command is supported by windows. Read more
source§impl Debug for PushKeyboardEnhancementFlags
impl Debug for PushKeyboardEnhancementFlags
source§impl PartialEq<PushKeyboardEnhancementFlags> for PushKeyboardEnhancementFlags
impl PartialEq<PushKeyboardEnhancementFlags> for PushKeyboardEnhancementFlags
source§fn eq(&self, other: &PushKeyboardEnhancementFlags) -> bool
fn eq(&self, other: &PushKeyboardEnhancementFlags) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PushKeyboardEnhancementFlags
impl Eq for PushKeyboardEnhancementFlags
impl StructuralEq for PushKeyboardEnhancementFlags
impl StructuralPartialEq for PushKeyboardEnhancementFlags
Auto Trait Implementations§
impl RefUnwindSafe for PushKeyboardEnhancementFlags
impl Send for PushKeyboardEnhancementFlags
impl Sync for PushKeyboardEnhancementFlags
impl Unpin for PushKeyboardEnhancementFlags
impl UnwindSafe for PushKeyboardEnhancementFlags
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
Mutably borrows from an owned value. Read more