[][src]Struct livesplit_core::HotkeySystem

pub struct HotkeySystem { /* fields omitted */ }

With a Hotkey System the runner can use hotkeys on their keyboard to control the Timer. The hotkeys are global, so the application doesn't need to be in focus. The behavior of the hotkeys depends on the platform and is stubbed out on platforms that don't support hotkeys. You can turn off a Hotkey System temporarily. By default the Hotkey System is activated.

Methods

impl HotkeySystem[src]

pub fn new(timer: SharedTimer) -> Result<Self>[src]

Creates a new Hotkey System for a Timer with the default hotkeys.

pub fn with_config(timer: SharedTimer, config: HotkeyConfig) -> Result<Self>[src]

Creates a new Hotkey System for a Timer with a custom configuration for the hotkeys.

pub fn set_split(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for splitting and starting a new attempt.

pub fn set_reset(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for resetting the current attempt.

pub fn set_pause(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for pausing the current attempt and starting a new attempt.

pub fn set_skip(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for skipping the current split.

pub fn set_undo(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for undoing the last split.

pub fn set_previous_comparison(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for switching to the previous comparison.

pub fn set_next_comparison(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for switching to the next comparison.

pub fn set_undo_all_pauses(&mut self, hotkey: Option<KeyCode>) -> Result<()>[src]

Sets the key to use for removing all the pause times from the current time.

pub fn set_toggle_timing_method(
    &mut self,
    hotkey: Option<KeyCode>
) -> Result<()>
[src]

Sets the key to use for toggling between the Real Time and Game Time timing methods.

pub fn deactivate(&self)[src]

Deactivates the Hotkey System. No hotkeys will go through until it gets activated again. If it's already deactivated, nothing happens.

pub fn activate(&self)[src]

Activates a previously deactivated Hotkey System. If it's already active, nothing happens.

pub fn config(&self) -> HotkeyConfig[src]

Returns the hotkey configuration currently in use by the Hotkey System.

pub fn set_config(&mut self, config: HotkeyConfig) -> Result<()>[src]

Applies a new hotkey configuration to the Hotkey System. Each hotkey is changed to the one specified in the configuration. This operation may fail if you provide a hotkey configuration where a hotkey is used for multiple operations.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.