input#
find_key_bound_to_binding#
returns key bound to a csgo setting
| Fields | Description |
|---|---|
setting_namestring |
setting name |
Example
local crouch_key = input.find_key_bound_to_binding("duck")
print("Is Crouching:", input.is_key_held(crouch_key))
get_mouse_pos#
returns x and y coordinates of the mouse position as a vec2_t
Example
is_mouse_in_bounds#
returns if the mouse is in specified boundss
| Fields | Description |
|---|---|
bounds_startvec2_t |
area bounds start |
bounds_endvec2_t |
area bounds end |
Example
is_key_toggled#
returns if they key is toggled
| Fields | Description |
|---|---|
key_codee_keys |
key code |
Example
local key_toggled = input.is_key_toggled(e_keys.KEY_C)
if(key_toggled) then
print("key C toggled")
end
is_key_pressed#
returns if they key was just pressed
| Fields | Description |
|---|---|
key_codee_keys |
key code |
Example
local key_pressed = input.is_key_pressed(e_keys.KEY_C)
if(key_pressed) then
print("key C pressed")
end
is_key_released#
returns if current key was just released
| Fields | Description |
|---|---|
key_codee_keys |
key code enum |
Example
local key_released = input.is_key_released(e_keys.KEY_C)
if(key_released) then
print("key C released")
end
is_key_held#
returns if current key is held
| Fields | Description |
|---|---|
key_codee_keys |
key code enum |
Example
get_time_held#
returns how long a key was held for
| Fields | Description |
|---|---|
key_codee_keys |
key code enum |
Example
get_scroll_delta#
returns mouse scroll delta
Example
get_key_name#
returns the key name for the key id
block#
blocks input for the next input tick