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
Source§impl WebEventExt for KeyboardData
 
impl WebEventExt for KeyboardData
Source§type WebEvent = KeyboardEvent
 
type WebEvent = KeyboardEvent
The web specific event type
Source§fn try_as_web_event(&self) -> Option<KeyboardEvent>
 
fn try_as_web_event(&self) -> Option<KeyboardEvent>
Try to downcast this event as a 
web-sys event.Source§fn as_web_event(&self) -> Self::WebEventwhere
    Self::WebEvent: 'static,
 
fn as_web_event(&self) -> Self::WebEventwhere
    Self::WebEvent: 'static,
Downcast this event as a 
web-sys event.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.