diff options
author | 2020-10-08 03:44:22 +0200 | |
---|---|---|
committer | 2020-10-08 03:44:22 +0200 | |
commit | 16cd38a198f8bd94c8957eee9165dde4e8f85c68 (patch) | |
tree | 9c7255dcf7979bbb262592624b56f95ab3bb52f7 /core | |
parent | 159e8a6abc222fa3d2c92a86898f9d313b02ee6c (diff) | |
download | iced-16cd38a198f8bd94c8957eee9165dde4e8f85c68.tar.gz iced-16cd38a198f8bd94c8957eee9165dde4e8f85c68.tar.bz2 iced-16cd38a198f8bd94c8957eee9165dde4e8f85c68.zip |
Keep `KeyCode` names synchronized with `winit`
Diffstat (limited to 'core')
-rw-r--r-- | core/src/keyboard/key_code.rs | 40 |
1 files changed, 22 insertions, 18 deletions
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, |