Hello addon developers! Sorry if I'm writing in the wrong place.
I want to create a button that would track the buff on me. And when a button appears, I would press it and use a spell.
For this, I decided to use the addon Weakauras 2. This addon can track buffs, it remains only to write the code for the button.
The button only responds to a mouse left click.
Please tell me what needs to be added to the code so that my button responds to the "1" key.
-- Creating button
local captor = CreateFrame("Button", nil, aura_env.region, "SecureActionButtonTemplate")
-- Setting position
point, relativeTo, relativePoint, xOfs, yOfs = aura_env.region:GetPoint()
captor:SetPoint(point, relativeTo, relativePoint, xOfs, yOfs)