pub enum KeyCode {
Show 126 variants ArrowUp, ArrowDown, ArrowLeft, ArrowRight, CtrlArrowUp, CtrlArrowDown, CtrlArrowLeft, CtrlArrowRight, ShiftArrowUp, ShiftArrowDown, ShiftArrowLeft, ShiftArrowRight, CtrlShiftArrowUp, CtrlShiftArrowDown, CtrlShiftArrowLeft, CtrlShiftArrowRight, Numpad5, CtrlNumpad5, Delete, Insert, Home, End, PageUp, PageDown, CtrlDelete, CtrlInsert, CtrlHome, CtrlEnd, CtrlPageUp, CtrlPageDown, ShiftDelete, ShiftInsert, ShiftHome, ShiftEnd, ShiftPageUp, ShiftPageDown, CtrlShiftDelete, CtrlShiftInsert, CtrlShiftHome, CtrlShiftEnd, CtrlShiftPageUp, CtrlShiftPageDown, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, CtrlF1, CtrlF2, CtrlF3, CtrlF4, CtrlF5, CtrlF6, CtrlF7, CtrlF8, CtrlF9, CtrlF10, CtrlF11, CtrlF12, ShiftF1, ShiftF2, ShiftF3, ShiftF4, ShiftF5, ShiftF6, ShiftF7, ShiftF8, ShiftF9, ShiftF10, ShiftF11, ShiftF12, CtrlShiftF1, CtrlShiftF2, CtrlShiftF3, CtrlShiftF4, CtrlShiftF5, CtrlShiftF6, CtrlShiftF7, CtrlShiftF8, CtrlShiftF9, CtrlShiftF10, CtrlShiftF11, CtrlShiftF12, CtrlA, CtrlB, CtrlC, CtrlD, CtrlE, CtrlF, CtrlG, CtrlH, Tab, ShiftTab, Linefeed, CtrlK, CtrlL, Enter, CtrlN, CtrlO, CtrlP, CtrlQ, CtrlR, CtrlS, CtrlT, CtrlU, CtrlV, CtrlW, CtrlX, CtrlY, CtrlZ, Space, Backspace, Escape, Menu, CtrlMenu, ShiftMenu, CtrlShiftMenu, Char(char), Byte(u8),
}

Variants

ArrowUp

ArrowDown

ArrowLeft

ArrowRight

CtrlArrowUp

CtrlArrowDown

CtrlArrowLeft

CtrlArrowRight

ShiftArrowUp

ShiftArrowDown

ShiftArrowLeft

ShiftArrowRight

CtrlShiftArrowUp

CtrlShiftArrowDown

CtrlShiftArrowLeft

CtrlShiftArrowRight

Numpad5

CtrlNumpad5

Delete

Insert

Home

End

PageUp

PageDown

CtrlDelete

CtrlInsert

CtrlHome

CtrlEnd

CtrlPageUp

CtrlPageDown

ShiftDelete

ShiftInsert

ShiftHome

ShiftEnd

ShiftPageUp

ShiftPageDown

CtrlShiftDelete

CtrlShiftInsert

CtrlShiftHome

CtrlShiftEnd

CtrlShiftPageUp

CtrlShiftPageDown

F1

F2

F3

F4

F5

F6

F7

F8

F9

F10

F11

F12

CtrlF1

CtrlF2

CtrlF3

CtrlF4

CtrlF5

CtrlF6

CtrlF7

CtrlF8

CtrlF9

CtrlF10

CtrlF11

CtrlF12

ShiftF1

ShiftF2

ShiftF3

ShiftF4

ShiftF5

ShiftF6

ShiftF7

ShiftF8

ShiftF9

ShiftF10

ShiftF11

ShiftF12

CtrlShiftF1

CtrlShiftF2

CtrlShiftF3

CtrlShiftF4

CtrlShiftF5

CtrlShiftF6

CtrlShiftF7

CtrlShiftF8

CtrlShiftF9

CtrlShiftF10

CtrlShiftF11

CtrlShiftF12

CtrlA

CtrlB

CtrlC

CtrlD

CtrlE

CtrlF

CtrlG

CtrlH

Tab

ShiftTab

Linefeed

CtrlK

CtrlL

Enter

CtrlN

CtrlO

CtrlP

CtrlQ

CtrlR

CtrlS

CtrlT

CtrlU

CtrlV

CtrlW

CtrlX

CtrlY

CtrlZ

Space

Backspace

Escape

Menu

CtrlMenu

ShiftMenu

CtrlShiftMenu

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.