How to get the device when callback is called?

Hey, yes it’s not supported yet, as GraemeBB said, you can take a look at handlers Guide to Event Subscribing with Additional Parameters (Handler Functions)

You can either use an handler class like this

# Handler for a button InteractedWithEvent but could be used for any listenable requiring a (agent -> void) signature
on_prop_pickedup_function := type{_(:agent, :int) : void}
pickup_prop_button_handler := class:
    AdditionalData: int
    Callback: on_prop_pickedup_function

    HandleInteractedWithEvent(Agent:agent):void=
        Callback(Agent, AdditionalData)

Or you could use spawn as a quick lightweight solution

for (CaptureDevice : CaptureDevices):
    spawn{WaitForZoneToBeCaptured(CaptureDevice)}

WaitForZoneToBeCaptured(CaptureDevice : capture_area_device)<suspends>:void=
    loop:
        Agent := CaptureDevice.ControlChangeEvent.Await()
        # Agent is the new owner