pub struct KeyDownEvent {
pub keystroke: Keystroke,
pub is_held: bool,
pub prefer_character_input: bool,
}Expand description
重导出交互系统相关类型(Focusable、ClickArea 等) 平台的按键按下事件等价类型。
Fields§
§keystroke: Keystroke生成的按键输入。
is_held: bool按键当前是否处于按住状态。
prefer_character_input: bool是否优先处理字符输入而非按键绑定。 在某些情况下(如 Windows 上的 AltGr),修饰键对字符输入很重要。
Trait Implementations§
Source§impl Clone for KeyDownEvent
impl Clone for KeyDownEvent
Source§impl Debug for KeyDownEvent
impl Debug for KeyDownEvent
impl Eq for KeyDownEvent
Source§impl InputEvent for KeyDownEvent
impl InputEvent for KeyDownEvent
Source§fn to_platform_input(self) -> PlatformInput
fn to_platform_input(self) -> PlatformInput
将此事件转换为平台输入枚举。
impl KeyEvent for KeyDownEvent
Source§impl PartialEq for KeyDownEvent
impl PartialEq for KeyDownEvent
impl StructuralPartialEq for KeyDownEvent
Auto Trait Implementations§
impl Forget for KeyDownEvent
impl Freeze for KeyDownEvent
impl Move for KeyDownEvent
impl RefUnwindSafe for KeyDownEvent
impl Send for KeyDownEvent
impl Sync for KeyDownEvent
impl Unpin for KeyDownEvent
impl UnsafeUnpin for KeyDownEvent
impl UnwindSafe for KeyDownEvent
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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more