Look at the ammo counter on the dashboard to see which secondary weapon is selected when toggling through, so you shoot the desired ordnance.
Additionally, learn the .salvo (or dot salvo) commands. The .salvo command determines how many rockets or bombs are fired or dropped when you hit the trigger.
Open the text buffer. Type a dot, or period, followed by the word "salvo" (no spaces or quotes), then a space, and then a number. The number will be the number of rockets fired for each button press.
".salvo 1" fires one rocket, ".salvo 10" will fire all ten at once. (If you are flying a P-38 or P-47 you have ten rockets. Most other American planes carry six.)
I normally set my salvo to maximum when I take off, so that I can quickly dump my ords if I get jumped. Then I change the setting, if necessary, when I get close. And yes, I have the secondary weapon trigger and the "toggle secondary weapon" both mapped to joystick buttons.
Hope this helps. Welcome to the fun .