pub struct KeyPress {
pub key: Key,
pub modified_key: Key,
pub physical_key: Physical,
pub modifiers: Modifiers,
pub text: Option<SmolStr>,
pub status: Status,
}Expand description
A key press.
Fields§
§key: KeyThe original key pressed without modifiers applied to it.
You should use this key for combinations (e.g. Ctrl+C).
modified_key: KeyThe key pressed with modifiers applied to it.
You should use this key for any single key bindings (e.g. motions).
physical_key: PhysicalThe physical key pressed.
You should use this key for layout-independent bindings.
modifiers: ModifiersThe state of the keyboard modifiers.
text: Option<SmolStr>The text produced by the key press.
status: StatusThe current Status of the TextEditor.
Trait Implementations§
impl Eq for KeyPress
impl StructuralPartialEq for KeyPress
Auto Trait Implementations§
impl Freeze for KeyPress
impl RefUnwindSafe for KeyPress
impl Send for KeyPress
impl Sync for KeyPress
impl Unpin for KeyPress
impl UnsafeUnpin for KeyPress
impl UnwindSafe for KeyPress
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> 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
Compare self to
key and return true if they are equal.