Skip to content
On this page

AthenaClient.systems.hotkeyRegistry ​

Type Aliases ​

KeyInfoDefault ​

Ƭ KeyInfoDefault: player & { default: number }

Defined in ​

client/systems/hotkeyRegistry.ts:8

Functions ​

add ​

Usage

AthenaClient.systems.hotkeyRegistry.add(keyBind): void

Add a key bind to the start listening for key presses. https://www.toptal.com/developers/keycode

Parameters ​

NameType
keyBindKeyInfo

Returns ​

void

Defined in ​

client/systems/hotkeyRegistry.ts:240


checkValidation ​

Usage

AthenaClient.systems.hotkeyRegistry.checkValidation(keyOrIdentifier): boolean

Used to check if a keybind passes certain validation metrics. Useful for show on-screen data related to a key bind. Should only be called periodically. Roughly every 500ms~1s

Parameters ​

NameType
keyOrIdentifierstring | number

Returns ​

boolean

Defined in ​

client/systems/hotkeyRegistry.ts:258


disable ​

Usage

AthenaClient.systems.hotkeyRegistry.disable(keyOrIdentifier): void

Disble a keybind

Parameters ​

NameType
keyOrIdentifierstring | number

Returns ​

void

Defined in ​

client/systems/hotkeyRegistry.ts:272


enable ​

Usage

AthenaClient.systems.hotkeyRegistry.enable(keyOrIdentifier): void

Enable a keybind

Parameters ​

NameType
keyOrIdentifierstring | number

Returns ​

void

Defined in ​

client/systems/hotkeyRegistry.ts:281


hotkey ​

Usage

AthenaClient.systems.hotkeyRegistry.hotkey(keyOrIdentifier): player | undefined

Return a keybind information for a key. Returns undefined if key is not bound, or found.

Parameters ​

NameType
keyOrIdentifierstring | number

Returns ​

player | undefined

Defined in ​

client/systems/hotkeyRegistry.ts:355


hotkeys ​

Usage

AthenaClient.systems.hotkeyRegistry.hotkeys(): KeyInfoDefault[]

Returns all hotkeys and their relevant information.

Returns ​

KeyInfoDefault[]

Defined in ​

client/systems/hotkeyRegistry.ts:344


overwrite ​

Usage

AthenaClient.systems.hotkeyRegistry.overwrite(keyOrIdentifier, keyCode): void

Fully overwrites a keybind.

Call this function after onTicksStart

You may need to set a small delay after as well.

Export

Parameters ​

NameType
keyOrIdentifierstring | number
keyCodenumber

Returns ​

void

Defined in ​

client/systems/hotkeyRegistry.ts:323


rebind ​

Usage

AthenaClient.systems.hotkeyRegistry.rebind(keyOrIdentifier, keyCode): void

Allows a key to be rebound at runtime. Once a key is rebound, it will automatically be loaded on server rejoin.

Parameters ​

NameType
keyOrIdentifierstring | number
keyCodenumber

Returns ​

void

Defined in ​

client/systems/hotkeyRegistry.ts:290

Created by Stuyk | Est. 2020