[−][src]Struct sixtyfps_corelib::input::KeyboardModifiers
KeyboardModifiers wraps a u32 that reserves a single bit for each possible modifier key on a keyboard, such as Shift, Control, etc.
On macOS, the command key is mapped to the logo modifier.
On Windows, the windows key is mapped to the logo modifier.
Implementations
impl KeyboardModifiers
[src]
pub fn test(&self, modifier: KeyboardModifier) -> bool
[src]
Returns true if this set of keyboard modifiers includes the given modifier; false otherwise.
Arguments:
modifier
: The keyboard modifier to test for, usually one of the provided convenience constants such asSHIFT_MODIFIER
.
pub fn test_exclusive(&self, modifier: KeyboardModifier) -> bool
[src]
Returns true if this set of keyboard modifiers consists of exactly the one specified modifier; false otherwise.
Arguments:
modifier
: The only modifier that is allowed to be in this modifier set, in order
pub fn shift(&self) -> bool
[src]
Returns true if the shift key is part of this set of keyboard modifiers.
pub fn control(&self) -> bool
[src]
Returns true if the control key is part of this set of keyboard modifiers.
pub fn alt(&self) -> bool
[src]
Returns true if the alt key is part of this set of keyboard modifiers.
pub fn logo(&self) -> bool
[src]
Returns true if on macOS the command key and on Windows the Windows key is part of this set of keyboard modifiers.
Trait Implementations
impl Clone for KeyboardModifiers
[src]
pub fn clone(&self) -> KeyboardModifiers
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for KeyboardModifiers
[src]
impl Debug for KeyboardModifiers
[src]
impl Default for KeyboardModifiers
[src]
impl Eq for KeyboardModifiers
[src]
impl From<KeyboardModifier> for KeyboardModifiers
[src]
pub fn from(modifier: KeyboardModifier) -> Self
[src]
impl From<ModifiersState> for KeyboardModifiers
[src]
pub fn from(state: ModifiersState) -> Self
[src]
impl PartialEq<KeyboardModifiers> for KeyboardModifiers
[src]
pub fn eq(&self, other: &KeyboardModifiers) -> bool
[src]
pub fn ne(&self, other: &KeyboardModifiers) -> bool
[src]
impl StructuralEq for KeyboardModifiers
[src]
impl StructuralPartialEq for KeyboardModifiers
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyboardModifiers
[src]
impl Send for KeyboardModifiers
[src]
impl Sync for KeyboardModifiers
[src]
impl Unpin for KeyboardModifiers
[src]
impl UnwindSafe for KeyboardModifiers
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,