xjoymap plugin allows you to create assignments on a per aircraft basis. Every aircraft developer provides their own datarefs for their simulation.
you create a 'xjoymap.ini' text file on a per aircraft basis and the file has to reside on each aircraft root folder.
Everytime you select an aircraft in xplane, xjoymap will check on the aircraft root folder you are selecting if an 'xjoymap.ini' file exists and load it for aircraft assignment parametrization or will do nothing if the file is not found. No need to have a file for each aircraft in your hangar. Just for the ones you require special assignments.
xjoymap.ini file has a syntax structure for making the assignments you must comply. The documentation is included on the plugin and several examples over the forums.
this is an example of the xjoymap.ini file you have to place under the 737 root folder to map the captain's EHSI range and EHSI mode to buttons or keys.
*******************
xjoymap.ini
[EHSI Range]
new_command=EHSI Range
dataref=ixeg/733/ehsi/ehsi_range_cpt_act
description=EHSI Range
values = 0, 1, 2, 3, 4, 5
[EHSI Mode]
new_command=EHSI Mode
dataref=ixeg/733/ehsi/ehsi_mode_cpt_act
description=EHSI Mode
values = 0, 1, 2, 3, 4
*****************
note:
0,1,2,3,4,5 are the values the 'range' dataref will cycle under each mapped button clic. Each value has a corresponding range on the simulation
0,1,2,3,4 are the values the 'mode' dataref will cycle under each mapped button clic. Each value has a corresponding mode on the simulation
you can order the modes as per your liking or even cycle between less values. 1,4,5 (assuming you have no interest for 0,2,3 range selection)
Now you go to xplane joystick & assignment
tab or buttond adv tab
on the right side you will see under xplane standard list the new commands EHSI range and EHSI mode for you to map