ax.bind¶
Source: gamemode/framework/libraries/cl_bind.lua
Advanced key binding system allowing registration of key combinations with press and release callbacks.
Documented functions: 2
Functions¶
ax.bind:Register(keys, onPress, onRelease)¶
Register a key combination with press and release callbacks.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
keys |
table |
table of KEY_* constants representing the key combination. |
onPress |
function |
function to call when the key combination is pressed. |
onRelease |
function |
function to call when the key combination is released. |
Usage
ax.bind:Register({KEY_LCTRL, KEY_K}, function()
print("You pressed LCTRL + K")
end, function()
print("You released LCTRL + K")
end)
ax.bind:Translate(...)¶
Translate a list of KEY_* constants into a human-readable string.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
... |
varargs |
variable number of KEY_* constants. |
Returns
string: The translated key combination, or "NONE"