Skip to content

OnEvent -> SpecialKey

function Fusion.OnEvent(
    eventName: string
): SpecialKey

Given an event name, returns a special key which can listen for events of that name.

When paired with a callback in a property table, the special key connects the callback to the event.


Parameters

eventName : string

The name of the event that the special key should target.


Returns -> SpecialKey

A special key for listening to events of that name.


Learn More

Back to top