From add1818a05ad4b8d4672197afd477ab29f8446b5 Mon Sep 17 00:00:00 2001 From: MrGVSV Date: Wed, 15 Dec 2021 01:23:32 +0000 Subject: [PATCH] Add documentation to `KeyCode` for Mac users (#3331) # Objective `KeyCode::*Win` and `KeyCode::*Alt` might be confusing for some Mac users. ## Solution Added some small documentation to clarify the mappings for those developing on a Mac. ## Additional Context Related issue: #3240 --- crates/bevy_input/src/keyboard.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_input/src/keyboard.rs b/crates/bevy_input/src/keyboard.rs index 0d5bdb89f3..6bc952e818 100644 --- a/crates/bevy_input/src/keyboard.rs +++ b/crates/bevy_input/src/keyboard.rs @@ -177,10 +177,12 @@ pub enum KeyCode { Grave, Kana, Kanji, + /// The left alt key. Maps to left option on Mac. LAlt, LBracket, LControl, LShift, + /// The left Windows key. Maps to left Command on Mac. LWin, Mail, MediaSelect, @@ -201,10 +203,12 @@ pub enum KeyCode { PlayPause, Power, PrevTrack, + /// The right alt key. Maps to right option on Mac. RAlt, RBracket, RControl, RShift, + /// The right Windows key. Maps to right Command on Mac. RWin, Semicolon, Slash,