From 16cd38a198f8bd94c8957eee9165dde4e8f85c68 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 8 Oct 2020 03:44:22 +0200 Subject: Keep `KeyCode` names synchronized with `winit` --- core/src/keyboard/key_code.rs | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'core') diff --git a/core/src/keyboard/key_code.rs b/core/src/keyboard/key_code.rs index 966c5eb4..74ead170 100644 --- a/core/src/keyboard/key_code.rs +++ b/core/src/keyboard/key_code.rs @@ -27,8 +27,7 @@ pub enum KeyCode { Key9, /// The '0' key over the 'O' and 'P' keys. Key0, - Plus, - Asterisk, + A, B, C, @@ -56,7 +55,7 @@ pub enum KeyCode { Y, Z, - /// The Escape key, next to F1 + /// The Escape key, next to F1. Escape, F1, @@ -84,14 +83,14 @@ pub enum KeyCode { F23, F24, - /// Print Screen/SysRq + /// Print Screen/SysRq. Snapshot, - /// Scroll Lock + /// Scroll Lock. Scroll, - /// Pause/Break key, next to Scroll lock + /// Pause/Break key, next to Scroll lock. Pause, - /// `Insert`, next to Backspace + /// `Insert`, next to Backspace. Insert, Home, Delete, @@ -104,11 +103,14 @@ pub enum KeyCode { Right, Down, + /// The Backspace key, right over Enter. Backspace, + /// The Enter key. Enter, + /// The space bar. Space, - /// The "Compose" key on Linux + /// The "Compose" key on Linux. Compose, Caret, @@ -124,12 +126,20 @@ pub enum KeyCode { Numpad7, Numpad8, Numpad9, + NumpadAdd, + NumpadDivide, + NumpadDecimal, + NumpadComma, + NumpadEnter, + NumpadEquals, + NumpadMultiply, + NumpadSubtract, AbntC1, AbntC2, - Add, Apostrophe, Apps, + Asterisk, At, Ax, Backslash, @@ -138,8 +148,6 @@ pub enum KeyCode { Colon, Comma, Convert, - Decimal, - Divide, Equals, Grave, Kana, @@ -153,19 +161,16 @@ pub enum KeyCode { MediaSelect, MediaStop, Minus, - Multiply, Mute, MyComputer, - NavigateForward, // also called "Prior" - NavigateBackward, // also called "Next" + NavigateForward, // also called "Next" + NavigateBackward, // also called "Prior" NextTrack, NoConvert, - NumpadComma, - NumpadEnter, - NumpadEquals, OEM102, Period, PlayPause, + Plus, Power, PrevTrack, RAlt, @@ -177,7 +182,6 @@ pub enum KeyCode { Slash, Sleep, Stop, - Subtract, Sysrq, Tab, Underline, -- cgit