I'd check what keybind is used for the zoom in and zoom out at the controls, chck that at the lua file where the settings menu for those controls are created (keybindings) and check what function is used there.
Maybe you can use ZO_PreHook or SecurePostHook on it to react on the zoom change then.
esoui/ingame/globals/bindings.xml
<Category name="SI_KEYBINDINGS_CATEGORY_CAMERA">
<Action name="CAMERA_ZOOM_OUT">
<Down>CameraZoomOut()</Down>
</Action>
<Action name="CAMERA_ZOOM_IN">
<Down>CameraZoomIn()</Down>
</Action>
Func names are CameraZoomIn and CameraZoomOut
Test if they are protected via IsProtectedFunction("CameraZoomIn") or not.
Looks like it isn't so a SecurePostHook should/could work.
Lua Code:
SecurePostHook("CameraZoomIn", function()
d("Zooming in")
end)
SecurePostHook("CameraZoomOut", function()
d("Zooming out")
end)
Yep, tested, works