pub struct KeyboardAction {
pub keys: [Keys; 6],
pub alt: bool,
pub ctrl: bool,
pub shift: bool,
pub meta: bool,
}Expand description
A keyboard action, could be used for making key press/release events, Defaults to no keys or modifiers.
Fields§
§keys: [Keys; 6]Keys included in action, represented as usage-ids
alt: boolWhether ALT is held
ctrl: boolWhether CTRL is held
shift: boolWhether SHIFT is held
meta: boolWhether META is held
Implementations§
Source§impl KeyboardAction
impl KeyboardAction
Sourcepub fn get_modifer_code(&self) -> u8
pub fn get_modifer_code(&self) -> u8
Get the modifiers as their code representation
Trait Implementations§
Source§impl Clone for KeyboardAction
impl Clone for KeyboardAction
Source§fn clone(&self) -> KeyboardAction
fn clone(&self) -> KeyboardAction
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 KeyboardAction
impl Debug for KeyboardAction
Source§impl Default for KeyboardAction
impl Default for KeyboardAction
Source§impl PartialEq for KeyboardAction
impl PartialEq for KeyboardAction
impl Copy for KeyboardAction
impl Eq for KeyboardAction
impl StructuralPartialEq for KeyboardAction
Auto Trait Implementations§
impl Freeze for KeyboardAction
impl RefUnwindSafe for KeyboardAction
impl Send for KeyboardAction
impl Sync for KeyboardAction
impl Unpin for KeyboardAction
impl UnwindSafe for KeyboardAction
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