Skip to content
Astra
ProductDocumentationDownloadPricingCommunity
Sign inGet Astra

Explore Astra

Explore Astra

HomeProductPricingDocumentationDownloadRelease notesSystem status
Sign inDiscord
Roblox
IntroductionQuick start
Keys & licensingYour workspaceTroubleshooting
API reference
Closures
Debug
Environment
Metatables
Scheduler
Instances
Cache
Scripts
Signals
Filesystem
Input
Console
Cryptography
JSON
Regex
System
Scene files
Drawing
UI library
Renderer
Requests
Network
API reference

Input

Route keyboard and mouse events while the game is active.

Input events

FieldTypeDescription
TypestringKeyDown, KeyUp, Text, Paste, MouseDown, MouseUp, MouseMove or Wheel.
CodenumberWindows virtual-key code or mouse button number.
TextstringUTF-8 text for Text or Paste.
RepeatbooleanWhether a key-down event is an OS repeat.
DeltanumberWheel movement in notches.

Available functions

Context:destroyDestroys an input context.Context:geteventsDrains the input event queue.Context:getpasteReads text from a macOS paste event.Context:getpointerReads the pointer position in the game client.Context:setcaptureControls keyboard and mouse capture.Context:setregionSets the mouse capture region.input.createcontextCreates a script input context.input.isinterfaceactiveChecks whether native UI has suspended script input capture.iswindowactiveChecks whether a Vortex window is available for input.keyclickPresses and releases a key.keypressPresses a key.keyreleaseReleases a key.mouse1clickSends a left mouse click.mouse1pressPresses the left mouse button.mouse1releaseReleases the left mouse button.mouse2clickSends a right mouse click.mouse2pressPresses the right mouse button.mouse2releaseReleases the right mouse button.mousemoveabsMoves the pointer to a client position.mousemoverelMoves the pointer by a relative offset.mousescrollSends vertical scroll input.
PreviouswritefileFilesystemNextContext:destroyInput

On this page

Input eventsAvailable functions
Astra

A complete Luau workspace.
Your editor, scripts, and accounts in one place.

Get Astra

WindowsmacOSFree keyPricingRedeemDashboard

Product

EditorScript HubAccountsFeaturesComparison

Community

DiscordSystem statusSupport

Learn

DocumentationRelease notes

Developers

API referenceLuau LSPBenchmarks

Legal

TermsPrivacyCookiesRefund policy
System statusSupportTermsPrivacyCookies

© 2026 Astra. All rights reserved.