Ah. You want to re-map the Joystick buttons. That's different.

I went searching for the commands and found then in the code, at least the joystick part of it anyway. There are duplicate keyboard functions.
co_avevn.c assigns joystick_button 1,2,3
hm_avevn.c (and all the other helicopter type files) assigns joystick_button 4

set_event ((JOYSTICK_BUTTON + 1), MODIFIER_NONE, KEY_STATE_EITHER, launch_weapon_event);

set_event ((JOYSTICK_BUTTON + 2), MODIFIER_NONE, KEY_STATE_DOWN, select_next_weapon_event);

set_event ((JOYSTICK_BUTTON + 3), MODIFIER_NONE, KEY_STATE_DOWN, select_next_target_event);

and
set_event ((JOYSTICK_BUTTON + 4), MODIFIER_NONE, KEY_STATE_DOWN, virtual_cockpit_track_target_event);