View Single Post
06-17-19, 04:34 AM   #1
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 158
Binding simple keys from LUA

I have observed the following:

The key bindings are stored in "D:\Games\World of Warcraft\_retail_\WTF\Account\XYZ\bindings-cache.wtf"

If you reset all your key bindings to default, then this file gets deleted or is empty

If you make a simple change, eg set ' to be action bar 5, it then creates this file with
BINDINGMODE 0
bind 5 NONE
bind ' ACTIONBUTTON5

*****************************

I usually set my special/extra key bindings using the standard UI. It then creates the bindings-cache.wtf file. For example I set "shift 1" to be "bottom left action button 1" which inserts another entry to the bindings-cache.wtf file:
bind SHIFT-2 MULTIACTIONBAR1BUTTON2

I wanted to set those key bindings from my addon in LUA. I then did this:

SetBinding("SHIFT-1", "MULTIACTIONBAR1BUTTON1")

However this does not work as imagined. I have not got to the bottom of it yet. I have observed that right after a character reload it works fine, I can press Shift-1 and get the action expected. If I then go the key-bindings UI, the multiactionbar section appears empty and even if I ESC out of it, it has now "lost" my Shift-1 binding, until another /reload or login, and then the shift-1 works just fine, as long as I do not visit the key-bindings UI.

No other addons are loaded.

Could someone please help me understand this?
  Reply With Quote