Struct alacritty::input::keyboard::SequenceBuilder
source · pub struct SequenceBuilder {
mode: TermMode,
kitty_seq: bool,
kitty_encode_all: bool,
kitty_event_type: bool,
modifiers: SequenceModifiers,
}
Expand description
Helper to build escape sequence payloads from KeyEvent
.
Fields§
§mode: TermMode
§kitty_seq: bool
The emitted sequence should follow the kitty keyboard protocol.
kitty_encode_all: bool
Encode all the keys according to the protocol.
kitty_event_type: bool
Report event types.
modifiers: SequenceModifiers
Implementations§
source§impl SequenceBuilder
impl SequenceBuilder
sourcefn try_build_textual(
&self,
key: &KeyEvent,
associated_text: Option<&str>
) -> Option<SequenceBase>
fn try_build_textual( &self, key: &KeyEvent, associated_text: Option<&str> ) -> Option<SequenceBase>
Try building sequence from the event’s emitting text.
sourcefn try_build_numpad(&self, key: &KeyEvent) -> Option<SequenceBase>
fn try_build_numpad(&self, key: &KeyEvent) -> Option<SequenceBase>
Try building from numpad key.
None
is returned when the key is neither known nor numpad.
sourcefn try_build_named_kitty(&self, key: &KeyEvent) -> Option<SequenceBase>
fn try_build_named_kitty(&self, key: &KeyEvent) -> Option<SequenceBase>
Try building from NamedKey
using the kitty keyboard protocol encoding
for functional keys.
sourcefn try_build_named_normal(&self, key: &KeyEvent) -> Option<SequenceBase>
fn try_build_named_normal(&self, key: &KeyEvent) -> Option<SequenceBase>
Try building from NamedKey
.
sourcefn try_build_control_char_or_mod(
&self,
key: &KeyEvent,
mods: &mut SequenceModifiers
) -> Option<SequenceBase>
fn try_build_control_char_or_mod( &self, key: &KeyEvent, mods: &mut SequenceModifiers ) -> Option<SequenceBase>
Try building escape from control characters (e.g. Enter) and modifiers.
Auto Trait Implementations§
impl RefUnwindSafe for SequenceBuilder
impl Send for SequenceBuilder
impl Sync for SequenceBuilder
impl Unpin for SequenceBuilder
impl UnwindSafe for SequenceBuilder
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.