#[repr(transparent)]pub struct KeyMod(pub u16);Expand description
Bitmask of modifier keys currently pressed / latched.
Tuple Fields§
§0: u16Implementations§
Source§impl KeyMod
impl KeyMod
pub const NONE: KeyMod
pub const LSHIFT: KeyMod
pub const RSHIFT: KeyMod
pub const LEVEL5: KeyMod
pub const LCTRL: KeyMod
pub const RCTRL: KeyMod
pub const LALT: KeyMod
pub const RALT: KeyMod
pub const LGUI: KeyMod
pub const RGUI: KeyMod
pub const NUM: KeyMod
pub const CAPS: KeyMod
pub const MODE: KeyMod
pub const SCROLL: KeyMod
pub const SHIFT: KeyMod
pub const CTRL: KeyMod
pub const ALT: KeyMod
pub const GUI: KeyMod
pub const fn new(raw: u16) -> Self
pub const fn raw(self) -> u16
pub const fn contains(self, other: KeyMod) -> bool
pub const fn intersects(self, other: KeyMod) -> bool
pub const fn is_empty(self) -> bool
Trait Implementations§
Source§impl BitAndAssign for KeyMod
impl BitAndAssign for KeyMod
Source§fn bitand_assign(&mut self, rhs: KeyMod)
fn bitand_assign(&mut self, rhs: KeyMod)
Performs the
&= operation. Read moreSource§impl BitOrAssign for KeyMod
impl BitOrAssign for KeyMod
Source§fn bitor_assign(&mut self, rhs: KeyMod)
fn bitor_assign(&mut self, rhs: KeyMod)
Performs the
|= operation. Read moreSource§impl Ord for KeyMod
impl Ord for KeyMod
Source§impl PartialOrd for KeyMod
impl PartialOrd for KeyMod
impl Copy for KeyMod
impl Eq for KeyMod
impl StructuralPartialEq for KeyMod
Auto Trait Implementations§
impl Freeze for KeyMod
impl RefUnwindSafe for KeyMod
impl Send for KeyMod
impl Sync for KeyMod
impl Unpin for KeyMod
impl UnsafeUnpin for KeyMod
impl UnwindSafe for KeyMod
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