Help zooming animation track Y-axis view without ctrl-alt-mouse or trackpad

Godot Version

4.7.2.stable

Question

When creating/editing a Bezier Curve track in the Animation Dock, I need to zoom the Y-axis to be able to tune the curve. There’s an HSlider for hotizontal zoom but I can’t find one for vertical (I also tried ctrl, alt and shift while dragging in case that switched to vertical).

According to the documentation that’s possible with ctrl-alt-mouse wheel.

Using Ctrl + Alt + Mouse wheel will zoom in and out on the Y axis

Sadly my desktop is capturing ctrl-alt-mouse wheel so it never makes it to the Godot window! (I’m using KDE on Ubuntu on a desktop PC (no trackpad) and it switches the virtual desktop, swiping the Godot editor rapidly off the screen!) I haven’t found a way to rebind the KDE binding yet (I’ll keep working on that).

As such I need to rebind Y-zoom behaviour in Godot but I haven’t figured out how yet (couldn’t seem to find in Editor Settings | Shortcuts). How do I do this or, if it’s not yet possible, how would I best request this change? I’d even accept zooming both X&Y then I could use the slider.

Thanks!

p.s. While writing this, I discovered “Fit to panel” button next to the horizontal HSlider which is a gratefully discovered partial workaround! Now I can change values until they’re off the screen then fit to panel to adjust zoom again. Would still be much easier if I could adjust it manually! (please :smile:)

Did some code investigating and found where it’s done. Here are my notes. I didn’t find a way to configure it so I guess that means it needs a code change to address but I don’t know Godot code well to know what’s best approach. Please comment / forward as appropriate!

The primary code seems to be AnimationBezierTrackEdit::_zoom_callback()

That’s registered in constructor AnimationBezierTrackEdit::AnimationBezierTrackEdit() as panner->set_callbacks(callable_mp(this, &AnimationBezierTrackEdit::_pan_callback), callable_mp(this, &AnimationBezierTrackEdit::_zoom_callback));

panner is a ViewPanner (declared in the .h).

It has ViewPanner::gui_input()which has a branch (top of function) that starts by checking WHEEL_DOWN and WHEEL_UP. It then checks for is_ctrl_pressed(). If true, it does the callback (which involves lots of marshalling when stepped through in the debugger!!!) then calls the registers _zoom_callback() which checks is_alt_pressed() that, quite reasonably, gives false when not so.

So to change this, both would need to have the registrations changed to something configurable.

I’ve not looked at Godot code before but noticed several interesting macros including ED_IS_SHORTCUT() which has a sibling ED_GET_SHORTCUT() which might be useful? Could we add use of this to both parts (ViewPanner::gui_input() and _zoom_callback())? Or perhaps the 2 checks (is_ctrl_pressed() and is_alt_pressed()) should first be unified into a single location?