Developer Reference

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 NameDefault KeyControl ID
INPUT_JUMPSpacebar
INPUT_SPRINTLeft Shift
INPUT_ENTERF
INPUT_VEH_ACCELERATEW
INPUT_VEH_BRAKES
INPUT_VEH_STEER_LEFTA
INPUT_VEH_STEER_RIGHTD
INPUT_MOVE_UP_ONLYW
INPUT_MOVE_DOWN_ONLYS
INPUT_MOVE_LEFT_ONLYA
INPUT_MOVE_RIGHT_ONLYD
INPUT_RELOADR
INPUT_ATTACKLeft Mouse Button
INPUT_AIMRight Mouse Button
INPUT_CHARACTER_WHEELLeft Alt
INPUT_INTERACTION_MENUM
INPUT_DUCKLeft Ctrl
INPUT_SELECT_WEAPON_MELEE1
INPUT_SELECT_WEAPON_UNARMED2
INPUT_SELECT_WEAPON_SHOTGUN3
INPUT_PHONEUp Arrow
INPUT_COVERQ
INPUT_PICKUPE
INPUT_FRONTEND_DOWNDown Arrow
INPUT_FRONTEND_UPUp Arrow
INPUT_FRONTEND_LEFTLeft Arrow
INPUT_FRONTEND_RIGHTRight 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!