Docs/Library/Modules/ui/Key Prompts

Key Prompts

Library
Updated 2 months ago · v1.3.7

lib.showKeys

lua
lib.showKeys({
    position = 'bottom-right',
    direction = 'column',
    inputs = {
        { label = 'Open Trunk', key = 'E', icon = 'car', action = function() TriggerEvent('vehicle:openTrunk') end, canInteract = function() return true end },
        { label = 'Lock Vehicle', key = 'L', icon = 'lock', action = function() TriggerEvent('vehicle:toggleLock') end },
    },
})
FieldTypeRequiredDescription
positionstring | tableyesOverlay position
directionstringnorow, column, row-reverse, column-reverse
inputstable[]yesKey prompt entries

Input Entry Fields

FieldTypeRequiredDescription
keystringyesControl key name/code (string form)
labelstringyesPrompt label
iconstringyesPrompt icon
actionfunctionnoCallback when pressed
clientEventstringnoTrigger client event when pressed
serverEventstringnoTrigger server event when pressed
exportstringnoCall an export when pressed
argstablenoArguments for event/export
delaynumbernoHold/delay value
canInteractfunctionnoDynamically hide/disable input

lib.hideKeys

lua
lib.hideKeys()

lib.isKeysOpen

lua
local open = lib.isKeysOpen()
Was this page helpful?
This page was last updated on 12 March 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.