Skip to content

Commit add1818

Browse files
committed
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
1 parent 70c9165 commit add1818

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_input/src/keyboard.rs

+4
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,12 @@ pub enum KeyCode {
177177
Grave,
178178
Kana,
179179
Kanji,
180+
/// The left alt key. Maps to left option on Mac.
180181
LAlt,
181182
LBracket,
182183
LControl,
183184
LShift,
185+
/// The left Windows key. Maps to left Command on Mac.
184186
LWin,
185187
Mail,
186188
MediaSelect,
@@ -201,10 +203,12 @@ pub enum KeyCode {
201203
PlayPause,
202204
Power,
203205
PrevTrack,
206+
/// The right alt key. Maps to right option on Mac.
204207
RAlt,
205208
RBracket,
206209
RControl,
207210
RShift,
211+
/// The right Windows key. Maps to right Command on Mac.
208212
RWin,
209213
Semicolon,
210214
Slash,

0 commit comments

Comments
 (0)