pub enum Key {
Show 31 variants Enter, Tab, Backspace, Esc, Left, Right, Up, Down, Ins, Delete, Home, End, PageUp, PageDown, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Char(char), Ctrl(char), Alt(char), Unknown,
}
Expand description

Represents an key.

Variants

Enter

Both Enter (or Return) and numpad Enter

Tab

Tabulation key

Backspace

Backspace key

Esc

Escape key

Left

Left arrow

Right

Right arrow

Up

Up arrow

Down

Down arrow

Ins

Insert key

Delete

Delete key

Home

Home key

End

End key

PageUp

Page Up key

PageDown

Page Down key

F0

F0 key

F1

F1 key

F2

F2 key

F3

F3 key

F4

F4 key

F5

F5 key

F6

F6 key

F7

F7 key

F8

F8 key

F9

F9 key

F10

F10 key

F11

F11 key

F12

F12 key

Char(char)

Ctrl(char)

Alt(char)

Unknown

Implementations

If exit

Returns the function key corresponding to the given number

1 -> F1, etc…

Panics

If n == 0 || n > 12

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

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

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

Converts the given value to a String. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more