Skip to content

Commit

Permalink
Rename LWin and RWin to LSuper and RSuper
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-ec committed Jun 8, 2023
1 parent d6d25d8 commit 2bf5ec5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions crates/bevy_input/src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,10 @@ pub enum KeyCode {
LControl,
/// The `LShift` / `Left Shift` key.
LShift,
/// The `LWin` / `Left Windows` key. Maps to `Left Command` on Mac.
LWin,
/// The `LSuper` / `Left Super` key.
/// Generic keyboards usually display this key with the *Microsoft Windows* logo.
/// Apple keyboards call this key the *Command Key* and display it using the ⌘ character.
LSuper,

/// The `Mail` key.
Mail,
Expand Down Expand Up @@ -376,8 +378,10 @@ pub enum KeyCode {
RControl,
/// The `RShift` / `Right Shift` key.
RShift,
/// The `RWin` / `Right Windows` key. Maps to `Right Command` on Mac.
RWin,
/// The `RSuper` / `Right Super` key.
/// Generic keyboards usually display this key with the *Microsoft Windows* logo.
/// Apple keyboards call this key the *Command Key* and display it using the ⌘ character.
RSuper,

/// The `Semicolon` / `;` key.
Semicolon,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_winit/src/converters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn convert_virtual_key_code(virtual_key_code: winit::event::VirtualKeyCode)
winit::event::VirtualKeyCode::LBracket => KeyCode::LBracket,
winit::event::VirtualKeyCode::LControl => KeyCode::LControl,
winit::event::VirtualKeyCode::LShift => KeyCode::LShift,
winit::event::VirtualKeyCode::LWin => KeyCode::LWin,
winit::event::VirtualKeyCode::LWin => KeyCode::LSuper,
winit::event::VirtualKeyCode::Mail => KeyCode::Mail,
winit::event::VirtualKeyCode::MediaSelect => KeyCode::MediaSelect,
winit::event::VirtualKeyCode::MediaStop => KeyCode::MediaStop,
Expand All @@ -200,7 +200,7 @@ pub fn convert_virtual_key_code(virtual_key_code: winit::event::VirtualKeyCode)
winit::event::VirtualKeyCode::RBracket => KeyCode::RBracket,
winit::event::VirtualKeyCode::RControl => KeyCode::RControl,
winit::event::VirtualKeyCode::RShift => KeyCode::RShift,
winit::event::VirtualKeyCode::RWin => KeyCode::RWin,
winit::event::VirtualKeyCode::RWin => KeyCode::RSuper,
winit::event::VirtualKeyCode::Semicolon => KeyCode::Semicolon,
winit::event::VirtualKeyCode::Slash => KeyCode::Slash,
winit::event::VirtualKeyCode::Sleep => KeyCode::Sleep,
Expand Down

0 comments on commit 2bf5ec5

Please sign in to comment.