pub struct KeyDefinition {
pub key: &'static str,
pub key_code: i64,
pub code: &'static str,
pub text: Option<&'static str>,
}Expand description
Represents a key on a keyboard
Fields§
§key: &'static strThe key value (e.g., “a”, “Enter”).
key_code: i64The platform-specific key code.
code: &'static strThe physical key location (e.g., “KeyA”, “Digit1”).
text: Option<&'static str>The printable text, if applicable.
Trait Implementations§
Source§impl Clone for KeyDefinition
impl Clone for KeyDefinition
Source§fn clone(&self) -> KeyDefinition
fn clone(&self) -> KeyDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyDefinition
impl Debug for KeyDefinition
Source§impl Default for KeyDefinition
impl Default for KeyDefinition
Source§fn default() -> KeyDefinition
fn default() -> KeyDefinition
Returns the “default value” for a type. Read more
Source§impl PartialEq for KeyDefinition
impl PartialEq for KeyDefinition
impl Copy for KeyDefinition
impl Eq for KeyDefinition
impl StructuralPartialEq for KeyDefinition
Auto Trait Implementations§
impl Freeze for KeyDefinition
impl RefUnwindSafe for KeyDefinition
impl Send for KeyDefinition
impl Sync for KeyDefinition
impl Unpin for KeyDefinition
impl UnwindSafe for KeyDefinition
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.