Using TARGET GUI for assigning commands to the 3-way flaps switch. 
Assing two events for the FLAPS UP switch position: 
1. Select PRESS (rectangle button at the top), enter name of action: "Flaps Up", assign shortcut to flaps up Key Command, select pressing type: "Pulse", press Save Event, press Add Event. 
2. Edit copy of event to RELEASE (rectangle button at the top), name: "Flaps Down", assign shortcut to flaps down, select pressing type: "Pulse", save. 
For mid position of the flaps switch do nothing. 
For back position do as described above, only in reverse: PRESS for the flaps down action and RELEASE for the flaps up one. 
So we got 3 positions of flaps by 2 commands. 
If the initial position of the flap switch in the cockpit does not match with the joystick one, click in a circle once. 
Good landings.