Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Create a RunBinding secure action. #479

Open mikuhl-dev opened 9 months ago

mikuhl-dev commented 9 months ago

It would be useful to have a binding secure action, as this will allow addons to create on screen buttons with SecureActionButtonTemplate that execute bindings, especially movement keys, for accessibility. This assumes RunBinding knows to only call secure code in Blizzard-defined bindings.

button:SetAttribute("type", "binding");
button:SetAttribute("typerelease", "bindingrelease");
button:SetAttribute("binding", "FORWARD");
-- Might be necessary?
button:SetAttribute("pressAndHoldAction", true);

bindingrelease would provide "up" as the second argument to RunBinding, to ensure you start moving on down, and stop moving on up.

mikuhl-dev commented 4 months ago

Still dreaming of this. This is essentially already possible to do out of combat by making a button set a override binding for the left mouse button and have the button clicks pass through. Official support would remove the need for this hack.