[][src]Struct genie_hki::Hotkey

pub struct Hotkey {
    pub key: i32,
    pub string_id: i32,
    pub ctrl: bool,
    pub alt: bool,
    pub shift: bool,
    // some fields omitted
}

The information about a single hotkey.

Fields

key: i32

Keycode that activates this hotkey.

You can use a crate like keycodes to compare this to named virtual keys like keycodes::KEY_RETURN.

string_id: i32

The string ID for this hotkey's label. -1 if this hotkey is unused.

ctrl: bool

Whether the Ctrl key needs to be held to activate this hotkey.

alt: bool

Whether the Alt key needs to be held to activate this hotkey.

shift: bool

Whether the Shift key needs to be held to activate this hotkey.

Methods

impl Hotkey[src]

pub fn key(self, key: i32) -> Self[src]

pub fn string_id(self, string_id: i32) -> Self[src]

pub fn ctrl(self, ctrl: bool) -> Self[src]

pub fn alt(self, alt: bool) -> Self[src]

pub fn shift(self, shift: bool) -> Self[src]

Trait Implementations

impl Default for Hotkey[src]

impl Clone for Hotkey[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Hotkey[src]

Auto Trait Implementations

impl Send for Hotkey

impl Sync for Hotkey

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.