Lua SDKAPI reference
input
input - Legacy input aliases#
Pre-rename aliases kept for old scripts. New scripts use mouse.* and key.*.
input.press#
input.press(name)
Legacy alias of key.tap (no explicit tick count).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Action name. |
input.tap#
input.tap(name, [ticks])
Legacy alias of key.tap.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Action name. |
ticks | number | random 2-5 | Explicit assert duration. |
input.hold#
input.hold(name)
Legacy alias of key.hold.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Action name. |
input.release#
input.release(name)
Legacy alias of key.release.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Action name. |
input.block#
input.block(name)
Legacy alias of key.block.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Action name. |
input.is_held#
input.is_held(name) → boolean
Legacy alias of key.held.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | (required) | Key name. |
input.move_mouse#
input.move_mouse(dx, dy)
Legacy alias of mouse.move.
| Parameter | Type | Default | Description |
|---|---|---|---|
dx | number | (required) | Horizontal delta (px). |
dy | number | (required) | Vertical delta (px). |
input.aim_at_world#
input.aim_at_world(x, y, z)
Legacy alias of mouse.aim.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | number | (required) | World X coordinate. |
y | number | (required) | World Y coordinate. |
z | number | (required) | World Z coordinate. |
input.get_view_dir#
input.get_view_dir() → { x, y, z }
Legacy alias of mouse.direction.
input.set_view_dir#
input.set_view_dir(x, y, z)
Legacy alias of mouse.face.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | number | (required) | World X coordinate. |
y | number | (required) | World Y coordinate. |
z | number | (required) | World Z coordinate. |
Last updated 2026-10-03