Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectClient APIGenerated

Controls

const Controls: object

Defined in: client/api.d.ts:3251

Whether this client’s gameplay input reaches the game, and whether the mod draws a pointer.

A focused web view takes both already, so a panel opened with Web.focusView needs nothing here. This is for what focus cannot say: a pointer without freezing the player, a freeze without a pointer, or no pointer at all for a page that draws its own.

Every hold is counted and belongs to the resource that took it, so two resources cannot release each other’s, and one that stops gives back exactly what it took.

disable(): void

Takes this client’s gameplay input away from the game without drawing a pointer. The camera stops turning and the character stops moving.

void

enable(): void

Gives back one hold taken by disable. Input returns once nothing else holds it – a focused panel, the chat line, an overlay.

void

hideCursor(): void

Gives back one hold taken by showCursor.

void

isCursorVisible(): boolean

Whether the mod’s pointer is drawn right now.

boolean

True while anything holds it, this resource or not.

isEnabled(): boolean

Whether gameplay input is reaching the game right now.

boolean

False while anything holds it, this resource or not.

showCursor(): void

Draws the mod’s pointer without taking input. Its shape follows the topmost focused page, so a page’s own cursor styling is what the player sees.

void