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: boolThe emitted sequence should follow the kitty keyboard protocol.
kitty_encode_all: boolEncode all the keys according to the protocol.
kitty_event_type: boolReport event types.
modifiers: SequenceModifiersImplementations§
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 Freeze for SequenceBuilder
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.