Reorder and add comments to some of the virtual keys

This commit is contained in:
Tomaka17 2014-11-06 13:26:42 +01:00
parent 6208c59a48
commit 04f4135110

View file

@ -65,43 +65,57 @@ pub enum MouseButton {
#[deriving(Show, Hash, PartialEq, Eq, Clone)] #[deriving(Show, Hash, PartialEq, Eq, Clone)]
pub enum VirtualKeyCode { pub enum VirtualKeyCode {
Key0, /// The '1' key over the letters.
Key1, Key1,
/// The '2' key over the letters.
Key2, Key2,
/// The '3' key over the letters.
Key3, Key3,
/// The '4' key over the letters.
Key4, Key4,
/// The '5' key over the letters.
Key5, Key5,
/// The '6' key over the letters.
Key6, Key6,
/// The '7' key over the letters.
Key7, Key7,
/// The '8' key over the letters.
Key8, Key8,
/// The '9' key over the letters.
Key9, Key9,
/// The '0' key over the 'O' and 'P' keys.
Key0,
A, A,
AbntC1,
AbntC2,
Add,
Apostrophe,
Apps,
At,
Ax,
B, B,
Back,
Backslash,
C, C,
Calculator,
Capital,
Colon,
Comma,
Convert,
D, D,
Decimal,
Delete,
Divide,
Down,
E, E,
End,
Equals,
Escape,
F, F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
/// The Escape key, next to F1.
Escape,
F1, F1,
F2, F2,
F3, F3,
@ -117,35 +131,35 @@ pub enum VirtualKeyCode {
F13, F13,
F14, F14,
F15, F15,
G,
Grave, /// Print Screen/SysRq.
H, Snapshot,
Home, /// Scroll Lock.
I, Scroll,
/// Pause/Break key, next to Scroll lock.
Pause,
/// `Insert`, next to Backspace.
Insert, Insert,
J, Home,
K, Delete,
Kana, End,
Kanji, PageDown,
L, PageUp,
LAlt,
LBracket,
LControl,
Left, Left,
LMenu, Up,
LShift, Right,
LWin, Down,
M,
Mail, /// The Backspace key, right over Enter.
MediaSelect, // TODO: rename
MediaStop, Back,
Minus, /// The Enter key.
Multiply, Return,
Mute, /// The space bar.
MyComputer, Space,
N,
NextTrack,
NoConvert,
Numlock, Numlock,
Numpad0, Numpad0,
Numpad1, Numpad1,
@ -157,49 +171,66 @@ pub enum VirtualKeyCode {
Numpad7, Numpad7,
Numpad8, Numpad8,
Numpad9, Numpad9,
AbntC1,
AbntC2,
Add,
Apostrophe,
Apps,
At,
Ax,
Backslash,
Calculator,
Capital,
Colon,
Comma,
Convert,
Decimal,
Divide,
Equals,
Grave,
Kana,
Kanji,
LAlt,
LBracket,
LControl,
LMenu,
LShift,
LWin,
Mail,
MediaSelect,
MediaStop,
Minus,
Multiply,
Mute,
MyComputer,
NextTrack,
NoConvert,
NumpadComma, NumpadComma,
NumpadEnter, NumpadEnter,
NumpadEquals, NumpadEquals,
O,
OEM102, OEM102,
P,
PageDown,
PageUp,
Pause,
Period, Period,
Playpause, Playpause,
Power, Power,
Prevtrack, Prevtrack,
Q,
R,
RAlt, RAlt,
RBracket, RBracket,
RControl, RControl,
Return,
Right,
RMenu, RMenu,
RShift, RShift,
RWin, RWin,
S,
Scroll,
Semicolon, Semicolon,
Slash, Slash,
Sleep, Sleep,
Snapshot,
Space,
Stop, Stop,
Subtract, Subtract,
Sysrq, Sysrq,
T,
Tab, Tab,
U,
Underline, Underline,
Unlabeled, Unlabeled,
Up,
V,
VolumeDown, VolumeDown,
VolumeUp, VolumeUp,
W,
Wake, Wake,
Webback, Webback,
WebFavorites, WebFavorites,
@ -208,8 +239,5 @@ pub enum VirtualKeyCode {
WebRefresh, WebRefresh,
WebSearch, WebSearch,
WebStop, WebStop,
X,
Y,
Yen, Yen,
Z
} }