pub struct GlobalHotkeySet { /* private fields */ }Available on crate feature
input only.Expand description
Implementations§
Source§impl GlobalHotkeySet
impl GlobalHotkeySet
Sourcepub fn new() -> Self
pub fn new() -> Self
Registers a new hotkey set with the system.
§Panics
Will panic if more than 1 instance is created per thread.
Sourcepub fn add_hotkey<KC>(
&mut self,
user_id: HotkeyId,
key_combination: KC,
) -> Result<()>where
KC: Into<KeyCombination>,
pub fn add_hotkey<KC>(
&mut self,
user_id: HotkeyId,
key_combination: KC,
) -> Result<()>where
KC: Into<KeyCombination>,
Adds a hotkey.
Not all key combinations may work as hotkeys.
pub fn listen_for_hotkeys<E, F>(&mut self, listener: F) -> Result<(), E>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlobalHotkeySet
impl RefUnwindSafe for GlobalHotkeySet
impl !Send for GlobalHotkeySet
impl !Sync for GlobalHotkeySet
impl Unpin for GlobalHotkeySet
impl UnwindSafe for GlobalHotkeySet
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