pub struct Modifiers(/* private fields */);Expand description
Modifier key and button state, carried on every input event.
Chrome equivalent: WebInputEvent::modifiers_ bitfield.
ⓘ
if event.modifiers.ctrl() && event.modifiers.shift() {
// Ctrl+Shift is held
}Implementations§
Source§impl Modifiers
impl Modifiers
Left mouse button is currently held.
Right mouse button is currently held.
Middle mouse button is currently held.
Sourcepub const fn is_auto_repeat(self) -> bool
pub const fn is_auto_repeat(self) -> bool
This is an auto-repeat key event (key held down).
pub const fn with_shift(self) -> Self
pub const fn with_ctrl(self) -> Self
pub const fn with_alt(self) -> Self
pub const fn with_meta(self) -> Self
pub const fn with_caps_lock(self) -> Self
pub const fn with_num_lock(self) -> Self
pub const fn with_auto_repeat(self) -> Self
Trait Implementations§
Source§impl BitOrAssign for Modifiers
impl BitOrAssign for Modifiers
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreimpl Copy for Modifiers
impl Eq for Modifiers
impl StructuralPartialEq for Modifiers
Auto Trait Implementations§
impl Freeze for Modifiers
impl RefUnwindSafe for Modifiers
impl Send for Modifiers
impl Sync for Modifiers
impl Unpin for Modifiers
impl UnsafeUnpin for Modifiers
impl UnwindSafe for Modifiers
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert