Enum yacurses::CursesKey[][src]

pub enum CursesKey {
    Ascii(u8),
    TerminalResized,
    Enter,
    Backspace,
    ArrowUp,
    ArrowDown,
    ArrowLeft,
    ArrowRight,
    Insert,
    Delete,
    Home,
    End,
    PageUp,
    PageDown,
    Keypad5NoNumlock,
    Function(u8),
    UnknownKey(u32),
}

The types of input keys that ncurses can generate.

Variants

Ascii(u8)

An ascii input (most all the keys with symbols on them).

TerminalResized

The terminal was resized.

yacurses will fix things on the curses side when this happens, but you should update anything on your side of the equation.

Enter

Enter key

Backspace

Backspace key

ArrowUp

Arrow upward (arrow key or numpad without numlock)

ArrowDown

Arrow downward (arrow key or numpad without numlock)

ArrowLeft

Arrow left (arrow key or numpad without numlock)

ArrowRight

Arrow right (arrow key or numpad without numlock)

Insert

Insert key

Delete

Delete key

Home

Home key (or numpad 7 without numlock on)

End

End key (or numpad 1 without numlock on)

PageUp

Page up / Previous Page (or numpad 9 without numlock on)

PageDown

Page down / Next Page (or numpad 3 without numlock on)

Keypad5NoNumlock

The middle key of the numpad if numlock isn’t on.

Function(u8)

A function key (F1, F2, etc.).

These aren’t the best supported because the terminal emulator often eat them before the program sees it.

UnknownKey(u32)

Some unknown input value.

You might want to file an issue to get this value included.

Implementations

impl CursesKey[src]

pub const fn from_ascii(ascii: u8) -> Self[src]

Convert a byte into a CursesKey::Ascii(byte)

Trait Implementations

impl Clone for CursesKey[src]

impl Copy for CursesKey[src]

impl Debug for CursesKey[src]

impl Eq for CursesKey[src]

impl PartialEq<CursesKey> for CursesKey[src]

impl StructuralEq for CursesKey[src]

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