Struct rustcn_ui::KeyboardData 
source · 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<'de> Deserialize<'de> for KeyboardData
 
impl<'de> Deserialize<'de> for KeyboardData
source§fn deserialize<D>(
    deserializer: D
) -> Result<KeyboardData, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
 
fn deserialize<D>(
    deserializer: D
) -> Result<KeyboardData, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&Event> for KeyboardData
 
impl From<&Event> for KeyboardData
source§fn from(e: &Event) -> KeyboardData
 
fn from(e: &Event) -> KeyboardData
Converts to this type from the input type.
source§impl From<&KeyboardData> for SerializedKeyboardData
 
impl From<&KeyboardData> for SerializedKeyboardData
source§fn from(data: &KeyboardData) -> SerializedKeyboardData
 
fn from(data: &KeyboardData) -> SerializedKeyboardData
Converts to this type from the input type.
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 From<Event> for KeyboardData
 
impl From<Event> for KeyboardData
source§fn from(e: Event) -> KeyboardData
 
fn from(e: Event) -> 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§fn eq(&self, other: &KeyboardData) -> bool
 
fn eq(&self, other: &KeyboardData) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl Serialize for KeyboardData
 
impl Serialize for KeyboardData
source§fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl WebEventExt<KeyboardEvent> for KeyboardData
 
impl WebEventExt<KeyboardEvent> for KeyboardData
source§fn web_event(&self) -> &KeyboardEvent
 
fn web_event(&self) -> &KeyboardEvent
Get the event as a web-sys event.
Auto Trait Implementations§
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> 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, 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.