Skip to main content
Client Runs in your resource.
string
required
1 to 32 letters, digits or underscores.
string
required
Shown in the FiveM key settings.
string
Such as E or F6. Players MAY change it.
UgKeyMapper
default:"Keyboard"
function
function
boolean
default:"true"
Ignores presses while a ug-lib dialog, context menu, radial or skill check is open.
  • The mapping is registered in your resource, as +<resource>-<name>, so players find it under your resource.
  • GetKey returns the key the player bound, such as G after a rebind. Keys the game shows as an icon, such as mouse buttons, return defaultKey. Read it each time you show it.
  • FiveM cannot unregister a key mapping: Remove disables it for good. Registering the same name again reuses it.

Example

client.lua