Joystick button

I connected the joystick to APM Planner 2.0. On the menu “File”->“Joystick” I see the state of the buttons - green pressed and released red, but can not tie a button to perform “Armed” or “Disarmed” and switch their flight modes on pixhawk.
Please help connect buttons.