Repository: projectharmonia/bevy_enhanced_input (language: rust)

Issue:
`Cardinal` is mirrored incorrectly
`Cardinal` negates the east input and doesn't negate the west input. Additionally, gamepads bind east to d-pad left and west to d-pad right. Same for wasd. This is backwards as far as I know. I'd expect east to be right and west to be left. 


Discussion / hints:
Unfortunately a breaking change to fix, but the fact that no one's noticed it up to now suggests it's not widely used yet. 

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7da14ea..3a4d5d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Derive `Reflect` for `Input` and `ModKeys`.
 - Derive `PartialEq` for `Input`.
 
+### Fixed
+
+- Reversed `west` and `east` directions for `Cardinal`.
+
 ## [0.7.2] - 2025-01-24
 
 ### Changed
diff --git a/src/input_context/preset.rs b/src/input_context/preset.rs
index 7f88756..c005ad6 100644
--- a/src/input_context/preset.rs
+++ b/src/input_context/preset.rs
@@ -75,9 +75,9 @@ impl Cardinal<KeyCode> {
     pub fn wasd_keys() -> Self {
         Self {
             north: KeyCode::KeyW,
-            east: KeyCode::KeyA,
+            west: KeyCode::KeyA,
             south: KeyCode::KeyS,
-            west: KeyCode::KeyD,
+            east: KeyCode::KeyD,
         }
     }
 
@@ -88,9 +88,9 @@ impl Cardinal<KeyCode> {
     pub fn arrow_keys() -> Self {
         Self {
             north: KeyCode::ArrowUp,
-            east: KeyCode::ArrowLeft,
+            west: KeyCode::ArrowLeft,
             south: KeyCode::ArrowDown,
-            west: KeyCode::ArrowRight,
+            east: KeyCode::ArrowRight,
         }
     }
 }
@@ -103,9 +103,9 @@ impl Cardinal<GamepadButton> {
     pub fn dpad_buttons() -> Self {
         Self {
             north: GamepadButton::DPadUp,
-            east: GamepadButton::DPadLeft,
+            west: GamepadButton::DPadLeft,
             south: GamepadButton::DPadDown,
-            west: GamepadButton::DPadRight,
+            east: GamepadButton::DPadRight,
         }
     }
 }
@@ -119,8 +119,8 @@ impl<I: InputBindSet> InputBindSet for Cardinal<I> {
             .map(|binding| binding.with_modifiers(SwizzleAxis::YXZ));
 
         // -X
-        let east = self
-            .east
+        let west = self
+            .west
             .bindings()
             .map(|binding| binding.with_modifiers(Negate::all()));
 
@@ -131,7 +131,7 @@ impl<I: InputBindSet> InputBindSet for Cardinal<I> {
             .map(|binding| binding.with_modifiers((Negate::all(), SwizzleAxis::YXZ)));
 
         // X
-        let west = self.west.bindings();
+        let east = self.east.bindings();
 
         north.chain(east).chain(south).chain(west)
     }


Test patch: