The Tact Switch in the side of joystick potentiometer
The potentiometers are the two black boxes on the sides of the joystick. If you move the joystick while watching the center shaft of each potentiometer, you’ll see that each of the potentiometers pick up movement in one direction.
This joystick also contains a tact switch which activates when you push down on the cap. The switch is the small black box on the rear of the joystick. If you push down on the cap, you can see a lever pushing down on the head of the switch. The lever works no matter what position the joystick is in.