FivePD API
Interfaces

IControlService

Used to register keybindings.

Methods

RegisterKeybind

Registers a method to be ran on keybind press.

Parameters

NameTypeDescription
idstringThe id of this keybind.
keystringThe key of this keybind.
titlestringThe description of this keybind.
onPressAction<FPlayer>The method that'll be invoked on press.
onReleaseAction<FPlayer>The method that'll be invoked on release.

RegisterMomentaryKeybind

Registers a method to be ran on keybind press. A momentary keybind also supports a release method to be ran on key release.

Parameters

NameTypeDescription
idstringThe id of this keybind.
keystringThe key of this keybind.
titlestringThe description of this keybind.
timeToHoldInMsintThe time to hold in ms.
onPressAction<FPlayer>The method that'll be invoked on press.
onReleaseAction<FPlayer>The method that'll be invoked on release.

RegisterMouseKeybind

Registers a method to be ran on keybind press.

Parameters

NameTypeDescription
idstringThe id of this keybind.
keystringThe key of this keybind.
titlestringThe description of this keybind.
onPressAction<FPlayer>The method that'll be invoked on press.
onReleaseAction<FPlayer>The method that'll be invoked on release.