Enum sixtyfps_corelib::input::InternalKeyCode[][src]

pub enum InternalKeyCode {
    Left,
    Right,
    Home,
    End,
    Back,
    Delete,
    Return,
    Escape,
}

InternalKeyCode is used to certain keys to unicode characters, since our public key event only exposes a string. This enum captures this mapping.

Variants

Left

Code corresponding to the left cursor key - encoded as 0xE ASCII (shift out)

Right

Code corresponding to the right cursor key – encoded as 0xF ASCII (shift in)

Home

Code corresponding to the home key – encoded as 0x2 ASCII (start of text)

End

Code corresponding to the end key – encoded as 0x3 ASCII (end of text)

Back

Code corresponding to the backspace key – encoded as 0x7 ASCII (backspace)

Delete

Code corresponding to the delete key – encoded as 0x7F ASCII (delete)

Return

Code corresponding to the return key – encoded as 0xA ASCII (newline)

Escape

Code corresponding to the return key – encoded as 0x1b ASCII (escape)

Implementations

impl InternalKeyCode[src]

pub fn encode_to_string(&self) -> SharedString[src]

Encodes the internal key code as string

pub fn try_decode_from_string(str: &SharedString) -> Option<Self>[src]

Tries to see if the provided string corresponds to a single special encoded key.

Trait Implementations

impl Clone for InternalKeyCode[src]

impl Debug for InternalKeyCode[src]

impl PartialEq<InternalKeyCode> for InternalKeyCode[src]

impl StructuralPartialEq for InternalKeyCode[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.