Struct dioxus::events::KeyboardData
source · pub struct KeyboardData { /* private fields */ }
Available on crate feature
html
only.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<&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 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
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> 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.
source§impl<Cfg> TryIntoConfig for Cfg
impl<Cfg> TryIntoConfig for Cfg
source§fn into_config(self) -> Option<Cfg>
fn into_config(self) -> Option<Cfg>
Available on crate feature
launch
only.