[][src]Enum wooting_sdk::Key

pub enum Key {
    Escape,
    F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    F11,
    F12,
    PrintScreen,
    Pause,
    ScrollLock,
    A1,
    A2,
    A3,
    Mode,
    Tilde,
    One,
    Two,
    Three,
    Four,
    Five,
    Six,
    Seven,
    Eight,
    Nine,
    Zero,
    Dash,
    Equals,
    Backspace,
    Insert,
    Home,
    PageUp,
    NumLock,
    NumDivide,
    NumMultiply,
    NumSubtract,
    Tab,
    Q,
    W,
    E,
    R,
    T,
    Y,
    U,
    I,
    O,
    P,
    LeftBracket,
    RightBracket,
    Backslash,
    Delete,
    End,
    PageDown,
    NumSeven,
    NumEight,
    NumNine,
    NumAddition,
    CapsLock,
    A,
    S,
    D,
    F,
    G,
    H,
    J,
    K,
    L,
    SemiColon,
    Apostrophe,
    ISO1,
    Return,
    NumFour,
    NumFive,
    NumSix,
    LeftShift,
    ISO2,
    Z,
    X,
    C,
    V,
    B,
    N,
    M,
    Comma,
    Period,
    ForwardSlash,
    RightShift,
    UpArrow,
    NumOne,
    NumTwo,
    NumThree,
    NumReturn,
    LeftControl,
    LeftMod,
    LeftAlt,
    Space,
    RightAlt,
    RightMod,
    Fn,
    RightControl,
    LeftArrow,
    DownArrow,
    RightArrow,
    NumZero,
    NumDelete,
}

Represents a key on the keyboard.

Variants

Escape

Escape key (Esc). Generates the escape character (ASCII 27).

F1

Function key (F1). Normally programmed to cause an operating system or application to perform certain actions.

F2

Function key (F2). Normally programmed to cause an operating system or application to perform certain actions.

F3

Function key (F3). Normally programmed to cause an operating system or application to perform certain actions.

F4

Function key (F4). Normally programmed to cause an operating system or application to perform certain actions.

F5

Function key (F5). Normally programmed to cause an operating system or application to perform certain actions.

F6

Function key (F6). Normally programmed to cause an operating system or application to perform certain actions.

F7

Function key (F7). Normally programmed to cause an operating system or application to perform certain actions.

F8

Function key (F8). Normally programmed to cause an operating system or application to perform certain actions.

F9

Function key (F9). Normally programmed to cause an operating system or application to perform certain actions.

F10

Function key (F10). Normally programmed to cause an operating system or application to perform certain actions.

F11

Function key (F11). Normally programmed to cause an operating system or application to perform certain actions.

F12

Function key (F12). Normally programmed to cause an operating system or application to perform certain actions.

PrintScreen

Print screen key (Prt Sc). May share the same key as system request. Normally takes a screenshot.

Pause

Pause (or break) key. Has no well defined purpose.

ScrollLock

Scroll lock key (Scr Lk). Has different functions or purposes depending on the application or operating system. Originally intended to make arrow keys scroll the current window contents instead of moving the cursor.

A1

Analog profile key (A1). Switches to analog profile one.

A2

Analog profile key (A2). Switches to analog profile two.

A3

Analog profile key (A3). Switches to analog profile three.

Mode

Mode key. Toggles between digital and analog modes.

Tilde

Tilde key (~).

One

Number one key (1).

Two

Number two key (2).

Three

Number three key (3).

Four

Number four key (4).

Five

Number five key (5).

Six

Number six key (6).

Seven

Number seven key (7).

Eight

Number eight key (8).

Nine

Number nine key (9).

Zero

Number zero key (0).

Dash

Dash or hyphen key (-).

Equals

Equals key (=).

Backspace

Backspace key. Moves display cursor one position backwards, deleting the character at that position and shifting back the text after that position by one position.

Insert

Insert key (Ins). Switches between two text entry modes - overtype or insert. Overtype mode replaces the character present in the current location. Insert mode inserts a character at the current position, forcing all characters past it one position further.

Home

Home key. Has the opposite effect of the end key.

PageUp

Page up key (Pg Up). Scrolls up in documents.

NumLock

Number lock key (Num). Affects the function of the numeric keypad located to the right of the main keyboard.

NumDivide

Divide key on the numpad (/). Types a forward slash or acts as a divison key in calculator applications.

NumMultiply

Multiply key on the numpad (*). Types a star or acts as a multiplication key in calculator applications.

NumSubtract

Subtract key on the numpad (-). Types a dash or acts as a subtraction key in calculator applications.

Tab

Tab key. Advances cursor to next tab stop.

Q

Letter q key.

W

Letter w key.

E

Letter e key.

R

Letter r key.

T

Letter t key.

Y

Letter y key.

U

Letter u key.

I

Letter i key.

O

Letter o key.

P

Letter p key.

LeftBracket

Left square bracket key ([).

RightBracket

Right square bracket key (]).

Backslash

Backslash key (\).

Delete

Delete key (Del). Deletes the character in the position after the cursor.

End

End key. Has the opposite effect of the home key.

PageDown

Page down key (Pg Dn). Scrolls down in documents.

NumSeven

Number seven key (7) on the numpad.

NumEight

Number eight key (8) on the numpad.

NumNine

Number nine key (9) on the numpad.

NumAddition

Addition key on the numpad (+). Types a plus or acts as a addition key in calculator applications.

CapsLock

Capitalization lock key. Causes all letters in latin-based scripts to be generated in capitals.

A

Letter a key.

S

Letter s key.

D

Letter d key.

F

Letter f key.

G

Letter g key.

H

Letter h key.

J

Letter j key.

K

Letter k key.

L

Letter l key.

SemiColon

Semi-colon key (;).

Apostrophe

Apostrophe key (').

ISO1

Represents a key that is specific to the keyboard layout. This key is positioned above the return key or to the left of the return key. On UK layouts, this is a pound (#) key. On US layouts, this is a backslash key. This key has the same scan index as the backslash key.

Return

Return (or enter) key.

NumFour

Number four key (4) on the numpad.

NumFive

Number five key (5) on the numpad.

NumSix

Number six key (6) on the numpad.

LeftShift

Left shift modifier key. Used to type capital letters and other alternate "upper" characters.

ISO2

Represents a key that is specific to the keyboard layout. This key is positioned to the right of the left shift key. On UK layouts, this is a backslash key. On US layouts, this key does not exist.

Z

Letter z key.

X

Letter x key.

C

Letter c key.

V

Letter v key.

B

Letter b key.

N

Letter n key.

M

Letter m key.

Comma

Comma key (,).

Period

Period key (.).

ForwardSlash

Forward slash key (/).

RightShift

Right shift modifier key. Performs the same function as left shift.

UpArrow

Up arrow key. Moves the cursor in the upwards direction.

NumOne

Number one key (1) on the numpad.

NumTwo

Number two key (2) on the numpad.

NumThree

Number three key (3) on the numpad.

NumReturn

Return (or enter) key on the numpad. Performs the same function as the normal return key.

LeftControl

Left control modifier key. Performs a special operation when pressed in conjunction with another key.

LeftMod

Left mod (or Windows) modifier key. Normally invokes the operating system's start menu.

LeftAlt

Left alt modifier key. Used to change (alternate) the function of other pressed keys.

Space

Space key ( ).

RightAlt

Right alt modifier key. Performs the same function as left alt.

RightMod

Right mod modifier key. Performs the same function as left mod.

Fn

Function key (Fn). Performs an alternative operation for some keys, normally defined by the keyboard and indicated by symbols on the key.

RightControl

Right control modifier key. Performs the same function as left control.

LeftArrow

Left arrow key. Moves the cursor in the left direction.

DownArrow

Down arrow key. Moves the cursor in the down direction.

RightArrow

Right arrow key. Moves the cursor in the right direction.

NumZero

Number zero key (0) on the numpad.

NumDelete

Delete key (Del) on the numpad. Performs the same function as the normal delete key.

Trait Implementations

impl Clone for Key[src]

impl Copy for Key[src]

impl Debug for Key[src]

impl Display for Key[src]

impl Eq for Key[src]

impl FromScanIndex for Key[src]

fn from_scan_index(index: u8) -> Option<Self>[src]

Return the key that corresponds to the provided scan index, if any.

impl Hash for Key[src]

impl IntoMatrixRowColumn for Key[src]

fn into_matrix_row_and_column(&self) -> (u8, u8)[src]

Returns a tuple (row, column) that represents the matrix row and column of the key.

impl PartialEq<Key> for Key[src]

impl StructuralEq for Key[src]

impl StructuralPartialEq for Key[src]

Auto Trait Implementations

impl RefUnwindSafe for Key

impl Send for Key

impl Sync for Key

impl Unpin for Key

impl UnwindSafe for Key

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> ToString for T where
    T: Display + ?Sized
[src]

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.