Lumax Posted February 20, 2015 Posted February 20, 2015 (edited) Hello all. Hello all. i have a X52 joystick (not the pro version) And im trying to setup the buttons for mig21 etc. I am not using the saitek software so, please dont post if youre suggestion involves using that software ;p I see that the the config files are written in lua scipting language. Now. i like to know if i if its possible to use example button 16 on my joystick.. to switched between (key button 1,2,3,4,5,6,7,8,9) "on the keyboard" basically what i want i that when i press button 16 on joystick it be the same as pressing 1 on keyboard. pressing the button one more time is the same as pressing 2 and so forth. once it reaches 9 it starts at 1 on next press. is is possible to make such a function? can anyone show me howto if so.. Edited February 20, 2015 by Lumax
Lumax Posted February 20, 2015 Author Posted February 20, 2015 (edited) Ok. so after searching around a bit i found where my config was saved. C:\Users\Me\Saved Games\DCS\Config\Input\MiG-21Bis\joystick\Saitek X52 Flight Controller {B768C110-8B26-11e2-8001-444553540000}.diff.lua I dig around in that file and found the button number i want to have as a "toggle switch". i descriped in 1st post. ["d3188pnilunilcd42vd0.6vpnilvunil"] = { ["added"] = { [1] = { ["key"] = "JOY_BTN16", }, }, ["name"] = "Select Weapon AA 1-2", }, so form here im stuck. so i dig a bit more around. and noticed the file "C:\Games\DCSWorld\Scripts\Input\InputEvents.lua"i noticed down the file this.. addEvent("JOY_BTN16", JOYSTICK_BUTTON15) im just starting to learn lua. but to me this seems like a event function that is triggered on control input. can i add this to the bottom of my config file: (Saitek X52 Flight Controller {B768C110-8B26-11e2-8001-444553540000}.diff.lua ) --- function MYFUNCTION () do stuff return something end addEvent("JOY_BTN16",MYFUNCTION) and clear out the d3120pnilunilcd14vd0vpnilvunil dict ? Edited February 21, 2015 by Lumax
Recommended Posts