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 ​
| Name | Type | 
|---|---|
| keyBind | KeyInfo | 
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 ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|number | 
Returns ​
boolean
Defined in ​
client/systems/hotkeyRegistry.ts:258
disable ​
Usage
AthenaClient.systems.hotkeyRegistry.disable(keyOrIdentifier): void
Disble a keybind
Parameters ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|number | 
Returns ​
void
Defined in ​
client/systems/hotkeyRegistry.ts:272
enable ​
Usage
AthenaClient.systems.hotkeyRegistry.enable(keyOrIdentifier): void
Enable a keybind
Parameters ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|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 ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|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 ​
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 ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|number | 
| keyCode | number | 
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 ​
| Name | Type | 
|---|---|
| keyOrIdentifier | string|number | 
| keyCode | number | 
Returns ​
void
 V5 Docs
V5 Docs