The actual key bindings are saved by the game in bindings-cache.wtf files. The file for all characters is the WTF\Account\<account_name>bindings-cache.wtf file. If you are using per character key bindings then they are found in the WTF\Account\<account_name>\<server_name>\<character_name>\bindings-cache.wtf files.
The BINDING- values in the CT_BarMod.lua saved variables file are just a record of what key you assigned to each CT_BarMod button while you were logged into a specific character.
Below you'll find two macros. You can use either one depending on how you want to recover the bindings. You can recover them from specific characters using the first macro, or from all characters using the second macro.
Macro 1: This macro will rebind keys using the saved BINDING- values of the character you are currently logged into. If you previously bound keys while logged into other characters, then you'll also have to log into each of those characters and run the macro. As the macro runs it will display the button number and the key assigned to the button.
/run local m=CT_BarMod for i,u in pairs(m.actionButtonList) do local b=m:getOption("BINDING-"..u.id) if b then print(u.id,b) SetBindingClick(b, u.name) end end SaveBindings(GetCurrentBindingSet())
Macro 2: This macro will rebind keys using the saved BINDING- values of all of the characters that are present in the CT_BarMod.lua saved variables file. As the macro runs, it will display the character and server name, the button number, and the key assigned to the button.
/run local m=CT_BarMod for c,t in pairs(CT_BarModOptions) do for k,v in pairs(t) do if strsub(k,1,8)=="BINDING-" then local i=strsub(k,9) print(i,v) SetBindingClick(v, "CT_BarModActionButton"..i) end end end SaveBindings(GetCurrentBindingSet())
|