pub struct KeyRepeatEvent {
pub physical_key: PhysicalKeyboardKey,
pub logical_key: LogicalKeyboardKey,
pub character: Option<String>,
pub time_stamp: Duration,
pub device_type: KeyEventDeviceType,
}Expand description
An event indicating that the user has been holding a key on the keyboard and causing repeated events.
Repeat events are not guaranteed and are provided only if supported by the underlying platform.
See also:
KeyDownEvent, a key event representing the user pressing a key.KeyUpEvent, a key event representing the user releasing a key.HardwareKeyboard, which produces this event.
Fields§
§physical_key: PhysicalKeyboardKey§logical_key: LogicalKeyboardKey§character: Option<String>See KeyEvent::character.
time_stamp: DurationSee KeyEvent::time_stamp.
device_type: KeyEventDeviceTypeImplementations§
Source§impl KeyRepeatEvent
impl KeyRepeatEvent
Sourcepub fn new(
physical_key: PhysicalKeyboardKey,
logical_key: LogicalKeyboardKey,
time_stamp: Duration,
) -> KeyRepeatEvent
pub fn new( physical_key: PhysicalKeyboardKey, logical_key: LogicalKeyboardKey, time_stamp: Duration, ) -> KeyRepeatEvent
Creates a key event that represents the user holding a key.
Sourcepub fn character(self, character: impl Into<String>) -> KeyRepeatEvent
pub fn character(self, character: impl Into<String>) -> KeyRepeatEvent
Dart KeyRepeatEvent(character:).
Sourcepub fn device_type(self, device_type: KeyEventDeviceType) -> KeyRepeatEvent
pub fn device_type(self, device_type: KeyEventDeviceType) -> KeyRepeatEvent
Dart KeyRepeatEvent(deviceType:).
Trait Implementations§
Source§impl Clone for KeyRepeatEvent
impl Clone for KeyRepeatEvent
Source§impl Debug for KeyRepeatEvent
impl Debug for KeyRepeatEvent
impl Eq for KeyRepeatEvent
Source§impl From<KeyRepeatEvent> for KeyEvent
impl From<KeyRepeatEvent> for KeyEvent
Source§fn from(event: KeyRepeatEvent) -> KeyEvent
fn from(event: KeyRepeatEvent) -> KeyEvent
Converts to this type from the input type.
Source§impl PartialEq for KeyRepeatEvent
impl PartialEq for KeyRepeatEvent
impl StructuralPartialEq for KeyRepeatEvent
Auto Trait Implementations§
impl Freeze for KeyRepeatEvent
impl RefUnwindSafe for KeyRepeatEvent
impl Send for KeyRepeatEvent
impl Sync for KeyRepeatEvent
impl Unpin for KeyRepeatEvent
impl UnsafeUnpin for KeyRepeatEvent
impl UnwindSafe for KeyRepeatEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.