pub struct KeyHelper;Expand description
Helper struct for creating typed key identifiers.
Implementations§
Source§impl KeyHelper
impl KeyHelper
pub const ESCAPE: &'static str = "escape"
pub const ESC: &'static str = "esc"
pub const ENTER: &'static str = "enter"
pub const RETURN: &'static str = "return"
pub const TAB: &'static str = "tab"
pub const SPACE: &'static str = "space"
pub const BACKSPACE: &'static str = "backspace"
pub const DELETE: &'static str = "delete"
pub const INSERT: &'static str = "insert"
pub const CLEAR: &'static str = "clear"
pub const HOME: &'static str = "home"
pub const END: &'static str = "end"
pub const PAGE_UP: &'static str = "pageUp"
pub const PAGE_DOWN: &'static str = "pageDown"
pub const UP: &'static str = "up"
pub const DOWN: &'static str = "down"
pub const LEFT: &'static str = "left"
pub const RIGHT: &'static str = "right"
pub const F1: &'static str = "f1"
pub const F2: &'static str = "f2"
pub const F3: &'static str = "f3"
pub const F4: &'static str = "f4"
pub const F5: &'static str = "f5"
pub const F6: &'static str = "f6"
pub const F7: &'static str = "f7"
pub const F8: &'static str = "f8"
pub const F9: &'static str = "f9"
pub const F10: &'static str = "f10"
pub const F11: &'static str = "f11"
pub const F12: &'static str = "f12"
pub const BACKTICK: &'static str = "`"
pub const HYPHEN: &'static str = "-"
pub const EQUALS: &'static str = "="
pub const LEFT_BRACKET: &'static str = "["
pub const RIGHT_BRACKET: &'static str = "]"
pub const BACKSLASH: &'static str = "\\"
pub const SEMICOLON: &'static str = ";"
pub const QUOTE: &'static str = "'"
pub const COMMA: &'static str = ","
pub const PERIOD: &'static str = "."
pub const SLASH: &'static str = "/"
pub fn ctrl(key: &str) -> String
pub fn shift(key: &str) -> String
pub fn alt(key: &str) -> String
pub fn super_key(key: &str) -> String
pub fn ctrl_shift(key: &str) -> String
pub fn ctrl_alt(key: &str) -> String
pub fn alt_shift(key: &str) -> String
Auto Trait Implementations§
impl Freeze for KeyHelper
impl RefUnwindSafe for KeyHelper
impl Send for KeyHelper
impl Sync for KeyHelper
impl Unpin for KeyHelper
impl UnsafeUnpin for KeyHelper
impl UnwindSafe for KeyHelper
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