pub struct KeyboardData { /* private fields */ }
Implementations§
source§impl KeyboardData
impl KeyboardData
sourcepub fn new(inner: impl HasKeyboardData + 'static) -> KeyboardData
pub fn new(inner: impl HasKeyboardData + 'static) -> KeyboardData
Create a new KeyboardData
sourcepub fn key(&self) -> Key
pub fn key(&self) -> Key
The value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout.
sourcepub fn code(&self) -> Code
pub fn code(&self) -> Code
A physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property returns a value that isn’t altered by keyboard layout or the state of the modifier keys.
sourcepub fn location(&self) -> Location
pub fn location(&self) -> Location
The location of the key on the keyboard or other input device.
sourcepub fn is_auto_repeating(&self) -> bool
pub fn is_auto_repeating(&self) -> bool
true
iff the key is being held down such that it is automatically repeating.
sourcepub fn is_composing(&self) -> bool
pub fn is_composing(&self) -> bool
Indicates whether the key is fired within a composition session.
Trait Implementations§
source§impl Debug for KeyboardData
impl Debug for KeyboardData
source§impl From<&PlatformEventData> for KeyboardData
impl From<&PlatformEventData> for KeyboardData
source§fn from(val: &PlatformEventData) -> KeyboardData
fn from(val: &PlatformEventData) -> KeyboardData
Converts to this type from the input type.
source§impl<E> From<E> for KeyboardDatawhere
E: HasKeyboardData,
impl<E> From<E> for KeyboardDatawhere
E: HasKeyboardData,
source§fn from(e: E) -> KeyboardData
fn from(e: E) -> KeyboardData
Converts to this type from the input type.
source§impl ModifiersInteraction for KeyboardData
impl ModifiersInteraction for KeyboardData
source§impl PartialEq for KeyboardData
impl PartialEq for KeyboardData
Auto Trait Implementations§
impl Freeze for KeyboardData
impl !RefUnwindSafe for KeyboardData
impl !Send for KeyboardData
impl !Sync for KeyboardData
impl Unpin for KeyboardData
impl !UnwindSafe for KeyboardData
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.