Skip to main content

KeyHelper

Struct KeyHelper 

Source
pub struct KeyHelper;
Expand description

Helper struct for creating typed key identifiers.

Implementations§

Source§

impl KeyHelper

Source

pub const ESCAPE: &'static str = "escape"

Source

pub const ESC: &'static str = "esc"

Source

pub const ENTER: &'static str = "enter"

Source

pub const RETURN: &'static str = "return"

Source

pub const TAB: &'static str = "tab"

Source

pub const SPACE: &'static str = "space"

Source

pub const BACKSPACE: &'static str = "backspace"

Source

pub const DELETE: &'static str = "delete"

Source

pub const INSERT: &'static str = "insert"

Source

pub const CLEAR: &'static str = "clear"

Source

pub const HOME: &'static str = "home"

Source

pub const END: &'static str = "end"

Source

pub const PAGE_UP: &'static str = "pageUp"

Source

pub const PAGE_DOWN: &'static str = "pageDown"

Source

pub const UP: &'static str = "up"

Source

pub const DOWN: &'static str = "down"

Source

pub const LEFT: &'static str = "left"

Source

pub const RIGHT: &'static str = "right"

Source

pub const F1: &'static str = "f1"

Source

pub const F2: &'static str = "f2"

Source

pub const F3: &'static str = "f3"

Source

pub const F4: &'static str = "f4"

Source

pub const F5: &'static str = "f5"

Source

pub const F6: &'static str = "f6"

Source

pub const F7: &'static str = "f7"

Source

pub const F8: &'static str = "f8"

Source

pub const F9: &'static str = "f9"

Source

pub const F10: &'static str = "f10"

Source

pub const F11: &'static str = "f11"

Source

pub const F12: &'static str = "f12"

Source

pub const BACKTICK: &'static str = "`"

Source

pub const HYPHEN: &'static str = "-"

Source

pub const EQUALS: &'static str = "="

Source

pub const LEFT_BRACKET: &'static str = "["

Source

pub const RIGHT_BRACKET: &'static str = "]"

Source

pub const BACKSLASH: &'static str = "\\"

Source

pub const SEMICOLON: &'static str = ";"

Source

pub const QUOTE: &'static str = "'"

Source

pub const COMMA: &'static str = ","

Source

pub const PERIOD: &'static str = "."

Source

pub const SLASH: &'static str = "/"

Source

pub fn ctrl(key: &str) -> String

Source

pub fn shift(key: &str) -> String

Source

pub fn alt(key: &str) -> String

Source

pub fn super_key(key: &str) -> String

Source

pub fn ctrl_shift(key: &str) -> String

Source

pub fn ctrl_alt(key: &str) -> String

Source

pub fn alt_shift(key: &str) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.