Did you calibrate transmitter on RealFlight? Once calibrated and channel is assigned, you can use the same way as real one. (2 switch to work as 6 position etc.) RealFlight has some limitation on switch type (some switch accepts 2 position only) so need to try to find working one. https://ardupilot.org/dev/docs/sitl-with-realflight.html
Apart form the calibration and configuration within RealFlight, it might be the case that your TX will work only when the RealFlight window is in focus.