pub enum KeyCode {
Show 54 variants ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Numpad5, Delete, Insert, Home, End, PageUp, PageDown, Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, CtrlA, CtrlB, CtrlC, CtrlD, CtrlE, CtrlF, CtrlG, CtrlH, Tab, Linefeed, CtrlK, CtrlL, Enter, CtrlN, CtrlO, CtrlP, CtrlQ, CtrlR, CtrlS, CtrlT, CtrlU, CtrlV, CtrlW, CtrlX, CtrlY, CtrlZ, Space, Backspace, Char(char), Byte(u8),
}

Variants

ArrowUp

ArrowDown

ArrowLeft

ArrowRight

Numpad5

Delete

Insert

Home

End

PageUp

PageDown

Escape

F1

F2

F3

F4

F5

F6

F7

F8

F9

F10

F11

F12

CtrlA

CtrlB

CtrlC

CtrlD

CtrlE

CtrlF

CtrlG

CtrlH

Tab

Linefeed

CtrlK

CtrlL

Enter

CtrlN

CtrlO

CtrlP

CtrlQ

CtrlR

CtrlS

CtrlT

CtrlU

CtrlV

CtrlW

CtrlX

CtrlY

CtrlZ

Space

Backspace

Char(char)

Byte(u8)

Implementations

KeyCodes are printable if they have a visible representation as a character, including whitespace.

Return the terminal byte sequences for a given KeyCode.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.