Hey all, I’m trying to figure out if it’s possible to have a Weakaura icon toggle on/off whenever I press a key. This is oddly specific but I’ll explain why I need this…
To min/max my keybind space I’ve decided to toggle between two action bars using “swapactionbar 1 5” as a macro (essentially turns 12 keys into 24 with a simple toggle). The problem with this is, unless I look down at my action bars I can’t tell which action bar I’m currently using.
After looking around for a while, I found another post that has attempted something similar to this but I haven’t gotten it to work in my situation. Here’s their custom code:
function(key, state)
if key == “LSHIFT” or key == “RSHIFT” then – If it was one of the shift keys that changed,
return state == 1 – Then show if the state is 1 (i.e. the key was pressed)
end
end
SOLVED:
One of my guildies helped me with this. His custom code is:
function()
return GetActionBarPage()
end
With “Display Text” showing “%c”