pub enum ModifiersKey {
Alt,
Ctrl,
Shift,
Win,
NoRepeat,
Non,
}Expand description
Modifier Key for hotkeys.
See: fsModifiers from https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey
Variants§
Alt
Ctrl
Shift
Win
NoRepeat
This is a virtual modifier key that is used to prevent automatically repeating triggers when the hotkey is being held down. When converting to a VirtualKey, this is mapped to KeyCode 0
Non
Implementations§
Source§impl ModifiersKey
impl ModifiersKey
Sourcepub fn from_keyname(val: &str) -> Result<Self, HotkeyError>
pub fn from_keyname(val: &str) -> Result<Self, HotkeyError>
Take in a string and interpret it as one of the modifier keys. Possible values are:
- ALT
- CTRL / CONTROL
- SHIFT
- WIN / WINDOWS / SUPER
- NOREPEAT / NO_REPEAT
Sourcepub const fn to_mod_code(&self) -> u32
pub const fn to_mod_code(&self) -> u32
Obtain the modifier code for the ModifiersKey.
See: fsModifiers from https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey
Trait Implementations§
Source§impl Clone for ModifiersKey
impl Clone for ModifiersKey
Source§fn clone(&self) -> ModifiersKey
fn clone(&self) -> ModifiersKey
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 ModifiersKey
impl Debug for ModifiersKey
Source§impl Display for ModifiersKey
impl Display for ModifiersKey
Source§impl From<ModifiersKey> for VirtualKey
impl From<ModifiersKey> for VirtualKey
Source§fn from(mk: ModifiersKey) -> VirtualKey
fn from(mk: ModifiersKey) -> VirtualKey
Converts to this type from the input type.
Source§impl Hash for ModifiersKey
impl Hash for ModifiersKey
Source§impl PartialEq for ModifiersKey
impl PartialEq for ModifiersKey
Source§impl TryFrom<&str> for ModifiersKey
impl TryFrom<&str> for ModifiersKey
Source§impl TryInto<ModifiersKey> for VirtualKey
impl TryInto<ModifiersKey> for VirtualKey
impl Copy for ModifiersKey
impl Eq for ModifiersKey
impl StructuralPartialEq for ModifiersKey
Auto Trait Implementations§
impl Freeze for ModifiersKey
impl RefUnwindSafe for ModifiersKey
impl Send for ModifiersKey
impl Sync for ModifiersKey
impl Unpin for ModifiersKey
impl UnwindSafe for ModifiersKey
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