[][src]Enum rustyline::KeyPress

#[non_exhaustive]pub enum KeyPress {
    UnknownEscSeq,
    Backspace,
    BackTab,
    BracketedPasteStart,
    BracketedPasteEnd,
    Char(char),
    ControlDown,
    ControlLeft,
    ControlRight,
    ControlUp,
    Ctrl(char),
    Delete,
    Down,
    End,
    Enter,
    Esc,
    F(u8),
    Home,
    Insert,
    Left,
    Meta(char),
    Null,
    PageDown,
    PageUp,
    Right,
    ShiftDown,
    ShiftLeft,
    ShiftRight,
    ShiftUp,
    Tab,
    Up,
}

Input key pressed

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownEscSeq

Unsupported escape sequence (on unix platform)

Backspace

⌫ or KeyPress::Ctrl('H')

BackTab

⇤ (usually Shift-Tab)

BracketedPasteStart

Paste (on unix platform)

BracketedPasteEnd

Paste (on unix platform)

Char(char)

Single char

ControlDown

Ctrl-↓

ControlLeft

Ctrl-←

ControlRight

Ctrl-→

ControlUp

Ctrl-↑

Ctrl(char)

Ctrl-char

Delete

Down

↓ arrow key

End

Enter

↵ or KeyPress::Ctrl('M')

Esc

Escape or KeyPress::Ctrl('[')

F(u8)

Function key

Home

Insert

Insert key

Left

← arrow key

Meta(char)

Escape-char or Alt-char

Null

KeyPress::Char('\0')

PageDown

PageUp

Right

→ arrow key

ShiftDown

Shift-↓

ShiftLeft

Shift-←

ShiftRight

Shift-→

ShiftUp

Shift-↑

Tab

⇥ or KeyPress::Ctrl('I')

Up

↑ arrow key

Trait Implementations

impl Clone for KeyPress[src]

impl Copy for KeyPress[src]

impl Debug for KeyPress[src]

impl Eq for KeyPress[src]

impl Hash for KeyPress[src]

impl PartialEq<KeyPress> for KeyPress[src]

impl StructuralEq for KeyPress[src]

impl StructuralPartialEq for KeyPress[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.