Switch Pro controller incorrect axis

I’m using my pro controller to play my game, but the movement doesn’t work.
Pushing up or down on the left joystick affect none of the axises. Pushing Left or right on the joystick affects the Vertical Axis.

This is the code I’m using:

float XInput;
float YInput;
void Update()
    XInput = Input.GetAxisRaw("Horizontal");
    YInput = Input.GetAxisRaw("Vertical");
    if(XInput != 0||YInput != 0)


I had the same problem.

To make it work the switch pro controller axis have to be mapped in the following way in Project Settings/Input:


Type: Joystick Axis

Axis: Y Axis


Type: Joystick Axis

Axis: 4th axis (Joysticks)

Edit: formatting