FiveM Keybinds & Control IDs
A searchable list of the most common GTA V Control IDs used in FiveM scripts to detect keyboard and mouse inputs.
Want to let players skip your loading screen with Spacebar?
Vice-Forge loading screens support interactive hotkeys and skip mechanics out of the box. Try it now.
Controls List
| Action Name | Default Key | Control ID |
|---|---|---|
| INPUT_JUMP | Spacebar | |
| INPUT_SPRINT | Left Shift | |
| INPUT_ENTER | F | |
| INPUT_VEH_ACCELERATE | W | |
| INPUT_VEH_BRAKE | S | |
| INPUT_VEH_STEER_LEFT | A | |
| INPUT_VEH_STEER_RIGHT | D | |
| INPUT_MOVE_UP_ONLY | W | |
| INPUT_MOVE_DOWN_ONLY | S | |
| INPUT_MOVE_LEFT_ONLY | A | |
| INPUT_MOVE_RIGHT_ONLY | D | |
| INPUT_RELOAD | R | |
| INPUT_ATTACK | Left Mouse Button | |
| INPUT_AIM | Right Mouse Button | |
| INPUT_CHARACTER_WHEEL | Left Alt | |
| INPUT_INTERACTION_MENU | M | |
| INPUT_DUCK | Left Ctrl | |
| INPUT_SELECT_WEAPON_MELEE | 1 | |
| INPUT_SELECT_WEAPON_UNARMED | 2 | |
| INPUT_SELECT_WEAPON_SHOTGUN | 3 | |
| INPUT_PHONE | Up Arrow | |
| INPUT_COVER | Q | |
| INPUT_PICKUP | E | |
| INPUT_FRONTEND_DOWN | Down Arrow | |
| INPUT_FRONTEND_UP | Up Arrow | |
| INPUT_FRONTEND_LEFT | Left Arrow | |
| INPUT_FRONTEND_RIGHT | Right Arrow |
How do Control IDs work in FiveM?
When writing a script that requires player interaction (such as pressing E to open a shop menu or Spacebar to jump), you must tell the game engine to listen for a specific Control ID.
GTA V does not listen for literal keys like "E" or "W" in the engine; it listens for "Actions". For example, the action of picking something up is bound to INPUT_PICKUP, which has a Control ID of 38. By default on a PC, Control ID 38 is bound to the "E" key.
Using IsControlJustPressed
The most common way to detect a key press in a FiveM Lua script is using the IsControlJustPressed native inside a loop. The first argument is the control group (usually 0 for player control), and the second is the Control ID from the table above.
Citizen.CreateThread(function()
while true do
Wait(0)
-- Control ID 38 is 'E' (INPUT_PICKUP)
if IsControlJustPressed(0, 38) then
print("The player pressed E!")
-- Your shop menu code here
OpenShopMenu()
end
end
end)Modern Best Practice: RegisterCommand
While checking Control IDs in a loop is still common, FiveM now recommends using RegisterCommand and RegisterKeyMapping for UI interactions, as it allows players to change their keybinds in the FiveM settings menu without editing your script!