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
Context:destroyContext:geteventsContext:getpasteContext:getpointerContext:setcaptureContext:setregioninput.createcontextinput.isinterfaceactiveiswindowactivekeyclickkeypresskeyreleasemouse1clickmouse1pressmouse1releasemouse2clickmouse2pressmouse2releasemousemoveabsmousemoverelmousescroll
Console
Cryptography
JSON
Regex
System
Scene files
Drawing
UI library
Renderer
Requests
Network
API referenceInput

keyrelease

Releases a key.

Syntax

Signature
keyrelease(Code: number) -> boolean

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
CodenumberWindows virtual-key code from 8 to 254.

Returns

TypeDescription
booleanWhether the platform accepted the event.

Notes

macOS translates supported codes to native keys.

Example

Luau
local Result = keyrelease(65)
print(Result)

Related functions

iswindowactivemouse1clickmouse1pressmouse1release
PreviouskeypressInputNextmouse1clickInput

On this page

SyntaxAliasesParametersReturnsNotesExampleRelated 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.