Maybe I just don't get it, but I tried to make zoom out button in editor by setting 'anim_event_action: XK_minus', but that just doesn't work for some reason.
Found the reason for this unwanted behaviour: The code contained a check that prevented key events from being handled when a mouse button is pressed. Not sure anymore which edge case I wanted to handle with this condition (and usually you probably do not press any keys while holding the mouse button pressed), but in this case it prevented global animation key event actions from being processed, as the mouse button is pressed and a key event is injected into the event queue by the animation's event action.
Fixed this!
I have created a new executable at the usual "development" location. Creating zoom in/out buttons works fine now (just created a test set by myself, but your existing definitions should just work fine now).
What's more interesting, it actually keeps the global anim button pressed when I hold on it despite the fact that there's only one anim part with just two anim frames.
Not able to reproduce what you described. When using your definitions (one single animation part with a two-frame animation), the animation just plays as defined, by endlessly changing between those two animation frames, regardless of the animation being clicked or not (because the "click" event will just restart the animation, then continuing the two-frame animation sequence again).
To create a button that works as expected, create two animation parts instead, one being normal (first part), one being pressed (second part), with the first part changing to the second part when being clicked (then triggering the event action to zoom in or out).