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