RedM Natives

Controls

CategoryControls
Rows3,298

Controls

Below are the default control mappings for QWERTY keyboards and Xbox controllers. Some controls are natively exclusive to a specific input method. If a control lacks a mapping for a particular device, it will be unusable on that input method.

This behavior is most common with axis-related inputs. To manage these input variations within your scripts, utilize the following natives:

  • IsUsingKeyboardAndMouse(control_type): Use this to check the player's active input method and toggle logic accordingly.
  • IsControlJustPressed(control_type, input): Used to detect a single input press event.
  • IsControlJustReleased(control_type, input): Used to detect a input release event.
  • IsControlPressed(control_type, input): Used to detect a continuous input press event.
  • GetControlNormal(control_type, input): Used for axis-based controls. It returns a float (-1.0 to 1.0) representing the degree of movement.

You can disable any actions using the DisableControlAction function, but you can still detect input press using these natives:

  • IsDisabledControlJustPressed(control_type, input): Used to detect a single disabled input press event.
  • IsDisabledControlJustReleased(control_type, input): Used to detect a disabled input release event.
  • IsDisabledControlPressed(control_type, input): Used to detect a continuous disabled input press event.

Please note that the input is mapped to the default button on the keyboard/gamepad. However, the player can change the default button to their own. This means you're binding the check not to a specific button, but to a specific input action (which could theoretically be bound to any button by player).

Contexts

Rockstar Games uses context-based input grouping. Context can be switched automatically. For example, the default context is "OnFoot." When you mount a horse, the context automatically changes to "OnMount," when you enter a carriage, it changes to "InVehicle." You can only detect inputs within the current context using the above natives.

For example, if you're on foot (the "OnFoot" context), you can't detect the input "INPUT_WHISTLE_HORSEBACK", which is available in the "OnMount" context and not available in "OnFoot".

You can arbitrarily change the context to your desired one using the native SetControlContext(control_type, context). This native doesn't need to be run every frame, but the engine can change it when necessary (for example, if you mount or dismount a horse). You can check the context for the corresponding control_type using the native GetCurrentControlContext(control_type).

Changing the context can disable almost all inputs. For example, by changing the context to "UIFeedInteractOverride", you'll only be able to detect the single input "INPUT_FEED_INTERACT". Also your character will lose control. To regain control, you need to change the context to the relevant one (i.e., if the character is on a horse, change it to "OnMount," if on foot, change it to "OnFoot," and so on).

The control_type for all contexts is 0. With the exception of:

OnMount 3
AnimalControlSet 3
InteractionLockOn 2

Remember that the default context for all other control_types is "false". And to reset to "default" you need to do this:

  SetControlContext(0, GetHashKey("OnFoot")) -- or OnMount or InVehicle or other relevant control
  SetControlContext(1, false)
  SetControlContext(2, false)
  SetControlContext(3, false)
  SetControlContext(4, false)
  SetControlContext(5, false)
  SetControlContext(6, false)

[!NOTE] Some controls in RedM works only since certain game versions.

Known controls for context names (click to expand the list.)

<details> <summary>ALL_INPUTS</summary>

ALL_INPUTS

</details> <details> <summary>OnFoot | 0xF5A638B9 | -173655879</summary>

OnFoot | 0xF5A638B9 | -173655879

</details> <details> <summary>OnMount | 0x374A4FC8 | 927616968</summary>

OnMount | 0x374A4FC8 | 927616968

</details> <details> <summary>InVehicle | 0x579FFAC8 | 1470102216</summary>

InVehicle | 0x579FFAC8 | 1470102216

</details> <details> <summary>AdvancedPhotoCamera | 0x58A2D75A | 1487066970</summary>

AdvancedPhotoCamera | 0x58A2D75A | 1487066970

</details> <details> <summary>AnimalControlSet | 0xF791597A | -141469318</summary>

AnimalControlSet | 0xF791597A | -141469318

</details> <details> <summary>Benchmark | 0xE548D37D | -448212099</summary>

Benchmark | 0xE548D37D | -448212099

</details> <details> <summary>BinocularsInUse | 0x2A69F2E8 | 711586536</summary>

BinocularsInUse | 0x2A69F2E8 | 711586536

</details> <details> <summary>BinocularsOnFoot | 0xE2BE25CD | -490854963</summary>

BinocularsOnFoot | 0xE2BE25CD | -490854963

</details> <details> <summary>Calderon1ForceDoor | 0x833F411C | -2093006564</summary>

Calderon1ForceDoor | 0x833F411C | -2093006564

</details> <details> <summary>CharacterCreator | 0x1334701A | 322203674</summary>

CharacterCreator | 0x1334701A | 322203674

</details> <details> <summary>ControlGamePadUI_InVehicle | 0xE1088952 | -519534254</summary>

ControlGamePadUI_InVehicle | 0xE1088952 | -519534254

</details> <details> <summary>ControlGamePadUI_OnFoot | 0x80730B6E | -2139944082</summary>

ControlGamePadUI_OnFoot | 0x80730B6E | -2139944082

</details> <details> <summary>ControlGamePadUI_OnMount | 0x4A7103CB | 1248920523</summary>

ControlGamePadUI_OnMount | 0x4A7103CB | 1248920523

</details> <details> <summary>CraftingMenu | 0x44BD2F77 | 1153249143</summary>

CraftingMenu | 0x44BD2F77 | 1153249143

</details> <details> <summary>CreatorOnFoot | 0x365A7C6F | 911899759</summary>

CreatorOnFoot | 0x365A7C6F | 911899759

</details> <details> <summary>CreatorSkyCam | 0x7B4D1CFB | 2068651259</summary>

CreatorSkyCam | 0x7B4D1CFB | 2068651259

</details> <details> <summary>DocumentMenus | 0xE6A1A134 | -425615052</summary>

DocumentMenus | 0xE6A1A134 | -425615052

</details> <details> <summary>FrontendMenu | 0x4418DF2D | 1142480685</summary>

FrontendMenu | 0x4418DF2D | 1142480685

</details> <details> <summary>GameMenu | 0x0F1B373C | 253441852</summary>

GameMenu | 0x0F1B373C | 253441852

</details> <details> <summary>GameMenuMouse | 0xB754A08A | -1219190646</summary>

GameMenuMouse | 0xB754A08A | -1219190646

</details> <details> <summary>Gang2RopeClimb | 0x283670BA | 674656442</summary>

Gang2RopeClimb | 0x283670BA | 674656442

</details> <details> <summary>GenericViewable | 0x21343857 | 557070423</summary>

GenericViewable | 0x21343857 | 557070423

</details> <details> <summary>HandheldCatalogue | 0x27C1720C | 666989068</summary>

HandheldCatalogue | 0x27C1720C | 666989068

</details> <details> <summary>Harmonica | 0xB6799759 | -1233545383</summary>

Harmonica | 0xB6799759 | -1233545383

</details> <details> <summary>HorseBreakingOverride | 0xA2211737 | -1574889673</summary>

HorseBreakingOverride | 0xA2211737 | -1574889673

</details> <details> <summary>HorseCommands | 0xABDA845F | -1411742625</summary>

HorseCommands | 0xABDA845F | -1411742625

</details> <details> <summary>HorseMeleeOverride | 0x3555984F | 894801999</summary>

HorseMeleeOverride | 0x3555984F | 894801999

</details> <details> <summary>HorseShopMenu | 0xCE328FFF | -835547137</summary>

HorseShopMenu | 0xCE328FFF | -835547137

</details> <details> <summary>InspectItem | 0x25823D28 | 629292328</summary>

InspectItem | 0x25823D28 | 629292328

</details> <details> <summary>InspectItemOutro | 0x2C14B132 | 739553586</summary>

InspectItemOutro | 0x2C14B132 | 739553586

</details> <details> <summary>InteractionLockOn | 0xBF0250A2 | -1090367326</summary>

InteractionLockOn | 0xBF0250A2 | -1090367326

</details> <details> <summary>InteractionMultiInputRightTrigger | 0x514F87C9 | 1364166601</summary>

InteractionMultiInputRightTrigger | 0x514F87C9 | 1364166601

</details> <details> <summary>InteractionMultiInputRightTriggerActiveUse | 0x0F13C5EE | 252954094</summary>

InteractionMultiInputRightTriggerActiveUse | 0x0F13C5EE | 252954094

</details> <details> <summary>Ledger | 0x58FC14F2 | 1492915442</summary>

Ledger | 0x58FC14F2 | 1492915442

</details> <details> <summary>LobbyMenu | 0xD92BC6A0 | -651442528</summary>

LobbyMenu | 0xD92BC6A0 | -651442528

</details> <details> <summary>MaintainInspectWeapon | 0xDD26FD77 | -584647305</summary>

MaintainInspectWeapon | 0xDD26FD77 | -584647305

</details> <details> <summary>Marston53BirthingFoal | 0xDDC00257 | -574619049</summary>

Marston53BirthingFoal | 0xDDC00257 | -574619049

</details> <details> <summary>MidGameOnlineLeaderboardOverride | 0x1D7C9630 | 494704176</summary>

MidGameOnlineLeaderboardOverride | 0x1D7C9630 | 494704176

</details> <details> <summary>MinigameBartender | 0xAA5E293D | -1436669635</summary>

MinigameBartender | 0xAA5E293D | -1436669635

</details> <details> <summary>MinigameBlackjack | 0xE422842C | -467499988</summary>

MinigameBlackjack | 0xE422842C | -467499988

</details> <details> <summary>MinigameBuilding | 0x359EC622 | 899597858</summary>

MinigameBuilding | 0x359EC622 | 899597858

</details> <details> <summary>MinigameBuildingFences | 0xB8FC12D7 | -1191439657</summary>

MinigameBuildingFences | 0xB8FC12D7 | -1191439657

</details> <details> <summary>MinigameCleaningStalls | 0x37DA4DCD | 937053645</summary>

MinigameCleaningStalls | 0x37DA4DCD | 937053645

</details> <details> <summary>MinigameCrackpotRCBoat | 0x4F0B7483 | 1326150787</summary>

MinigameCrackpotRCBoat | 0x4F0B7483 | 1326150787

</details> <details> <summary>MinigameDancing | 0x925309A0 | -1840051808</summary>

MinigameDancing | 0x925309A0 | -1840051808

</details> <details> <summary>MinigameDominoes | 0x56F12DDF | 1458646495</summary>

MinigameDominoes | 0x56F12DDF | 1458646495

</details> <details> <summary>MinigameDrinkingShooting | 0x643FE3F4 | 1681908724</summary>

MinigameDrinkingShooting | 0x643FE3F4 | 1681908724

</details> <details> <summary>MinigameFishing | 0xE12BDD1B | -517219045</summary>

MinigameFishing | 0xE12BDD1B | -517219045

</details> <details> <summary>MinigameFiveFingerFillet | 0x07A7F7B3 | 128448435</summary>

MinigameFiveFingerFillet | 0x07A7F7B3 | 128448435

</details> <details> <summary>MinigameInterrogation | 0xFE7EC400 | -25246720</summary>

MinigameInterrogation | 0xFE7EC400 | -25246720

</details> <details> <summary>MinigameMilking | 0x1FEBAB3D | 535538493</summary>

MinigameMilking | 0x1FEBAB3D | 535538493

</details> <details> <summary>MinigamePoker | 0x64876448 | 1686594632</summary>

MinigamePoker | 0x64876448 | 1686594632

</details> <details> <summary>MinigameTriggers | 0x6C84442D | 1820607533</summary>

MinigameTriggers | 0x6C84442D | 1820607533

</details> <details> <summary>Mudtown1WheelFixing | 0x91B5BA0F | -1850361329</summary>

Mudtown1WheelFixing | 0x91B5BA0F | -1850361329

</details> <details> <summary>NoPlayerControl | 0x250A2665 | 621422181</summary>

NoPlayerControl | 0x250A2665 | 621422181

</details> <details> <summary>ODriscolls3Surgery | 0x978E0ECA | -1752297782</summary>

ODriscolls3Surgery | 0x978E0ECA | -1752297782

</details> <details> <summary>OnlineCrafting | 0x18E462F9 | 417620729</summary>

OnlineCrafting | 0x18E462F9 | 417620729

</details> <details> <summary>OnlineDeathCamera | 0x9B1E6811 | -1692506095</summary>

OnlineDeathCamera | 0x9B1E6811 | -1692506095

</details> <details> <summary>OnlineIncapacitation | 0x003821E3 | 3678691</summary>

OnlineIncapacitation | 0x003821E3 | 3678691

</details> <details> <summary>OnlineLeaderboardEndScreen | 0xA89F0CAC | -1465971540</summary>

OnlineLeaderboardEndScreen | 0xA89F0CAC | -1465971540

</details> <details> <summary>OnlineLeaderboardOverride | 0x8491F8A5 | -2070808411</summary>

OnlineLeaderboardOverride | 0x8491F8A5 | -2070808411

</details> <details> <summary>OnlinePhotoStudioShop | 0xFB8BB38A | -74730614</summary>

OnlinePhotoStudioShop | 0xFB8BB38A | -74730614

</details> <details> <summary>OnlinePlayerMenu | 0x60C41F78 | 1623465848</summary>

OnlinePlayerMenu | 0x60C41F78 | 1623465848

</details> <details> <summary>OnlineSpectatorCamera | 0x86A5192F | -2036000465</summary>

OnlineSpectatorCamera | 0x86A5192F | -2036000465

</details> <details> <summary>PhotoCameraInUse | 0x5964EFB4 | 1499787188</summary>

PhotoCameraInUse | 0x5964EFB4 | 1499787188

</details> <details> <summary>PhotoCameraOnFoot | 0x1DC505E5 | 499451365</summary>

PhotoCameraOnFoot | 0x1DC505E5 | 499451365

</details> <details> <summary>PhotoFeed | 0x60661B64 | 1617304420</summary>

PhotoFeed | 0x60661B64 | 1617304420

</details> <details> <summary>PhotoFeedFullscreen | 0x0E8C0B4A | 244058954</summary>

PhotoFeedFullscreen | 0x0E8C0B4A | 244058954

</details> <details> <summary>PhotoFeedOptions | 0x2604671E | 637822750</summary>

PhotoFeedOptions | 0x2604671E | 637822750

</details> <details> <summary>PhotoMode | 0xE1B6886F | -508131217</summary>

PhotoMode | 0xE1B6886F | -508131217

</details> <details> <summary>PlayerJournal | 0x26E0BB81 | 652262273</summary>

PlayerJournal | 0x26E0BB81 | 652262273

</details> <details> <summary>PlayerPerfomingChore | 0x32FF8685 | 855606917</summary>

PlayerPerfomingChore | 0x32FF8685 | 855606917

</details> <details> <summary>QuickEquip | 0x39DDFB04 | 970849028</summary>

QuickEquip | 0x39DDFB04 | 970849028

</details> <details> <summary>QuickEquipAlt | 0xE36A9544 | -479554236</summary>

QuickEquipAlt | 0xE36A9544 | -479554236

</details> <details> <summary>Reverend1TrainTrackRescue | 0xE8C50D79 | -389739143</summary>

Reverend1TrainTrackRescue | 0xE8C50D79 | -389739143

</details> <details> <summary>Saloon1Drown | 0x8DE54725 | -1914353883</summary>

Saloon1Drown | 0x8DE54725 | -1914353883

</details> <details> <summary>Satchel | 0xFFC21415 | -4058091</summary>

Satchel | 0xFFC21415 | -4058091

</details> <details> <summary>SatchelFolder | 0x53CDA7AA | 1405986730</summary>

SatchelFolder | 0x53CDA7AA | 1405986730

</details> <details> <summary>ScriptedPunch | 0x45F0A26C | 1173398124</summary>

ScriptedPunch | 0x45F0A26C | 1173398124

</details> <details> <summary>ShopBrowsing | 0x8D3F53DB | -1925229605</summary>

ShopBrowsing | 0x8D3F53DB | -1925229605

</details> <details> <summary>ShopCatalogue | 0x7685CCAB | 1988480171</summary>

ShopCatalogue | 0x7685CCAB | 1988480171

</details> <details> <summary>SocialClubFeed | 0x5DA5A7EB | 1571137515</summary>

SocialClubFeed | 0x5DA5A7EB | 1571137515

</details> <details> <summary>SocialClubFeedFilter | 0xC09D15BE | -1063447106</summary>

SocialClubFeedFilter | 0xC09D15BE | -1063447106

</details> <details> <summary>SocialClubFeedOptions | 0x4F5979C8 | 1331263944</summary>

SocialClubFeedOptions | 0x4F5979C8 | 1331263944

</details> <details> <summary>SpectatorCamera | 0x0BCA8DBE | 197823934</summary>

SpectatorCamera | 0x0BCA8DBE | 197823934

</details> <details> <summary>StickyFeed | 0xB1A44613 | -1314634221</summary>

StickyFeed | 0xB1A44613 | -1314634221

</details> <details> <summary>Tithing | 0xDD2671F8 | -584683016</summary>

Tithing | 0xDD2671F8 | -584683016

</details> <details> <summary>UIFeedInteractOverride | 0x72B4EDFB | 1924460027</summary>

UIFeedInteractOverride | 0x72B4EDFB | 1924460027

</details> <details> <summary>UI_EMOTES_RADIAL_MENU | 0x1358F6F6 | 324597494</summary>

UI_EMOTES_RADIAL_MENU | 0x1358F6F6 | 324597494

</details> <details> <summary>UI_QUICK_SELECT_COMPACT_RADIAL_MENU | 0x8EA65D25 | -1901699803</summary>

UI_QUICK_SELECT_COMPACT_RADIAL_MENU | 0x8EA65D25 | -1901699803

</details> <details> <summary>UI_QUICK_SELECT_RADIAL_MENU | 0xB7A28A1A | -1214084582</summary>

UI_QUICK_SELECT_RADIAL_MENU | 0xB7A28A1A | -1214084582

</details> <details> <summary>UI_RADAR_EDIT_MODE | 0xEC2684E8 | -333019928</summary>

UI_RADAR_EDIT_MODE | 0xEC2684E8 | -333019928

</details> <details> <summary>Utopia1Jailbreak | 0x97375542 | -1757981374</summary>

Utopia1Jailbreak | 0x97375542 | -1757981374

</details> <details> <summary>Wardrobe | 0x350BCC77 | 889965687</summary>

Wardrobe | 0x350BCC77 | 889965687

</details> <details> <summary>WeaponEmotes_Simple | 0xE1133146 | -518835898</summary>

WeaponEmotes_Simple | 0xE1133146 | -518835898

</details> <details> <summary>WeaponEmotes_WithVariations | 0xB2982DEC | -1298649620</summary>

WeaponEmotes_WithVariations | 0xB2982DEC | -1298649620

</details> <details> <summary>WildernessSuppliesShop | 0xDC496046 | -599171002</summary>

WildernessSuppliesShop | 0xDC496046 | -599171002

</details> <details> <summary>Winter4TakingDynamite | 0x0427F072 | 69726322</summary>

Winter4TakingDynamite | 0x0427F072 | 69726322

</details> <details> <summary>MinigameOverlay | 0xF5893D32 | -175555278 :no_entry: <b>[UNUSED CONTEXT, EMPTY]</b> </summary>

UNUSED CONTEXT, EMPTY

</details> <details> <summary>InteractiveItemConsumption | 0x7BB3124B | 2075333195 :no_entry: <b>[UNUSED CONTEXT, EMPTY]</b> </summary>

UNUSED CONTEXT, EMPTY

</details> <details> <summary>SocialClubFeedControllerDisconnect | 0x641313CF | 1678971855 :no_entry: <b>[UNUSED CONTEXT, EMPTY]</b> </summary>

UNUSED CONTEXT, EMPTY

</details> <details> <summary> :no_entry: <b>[UNUSED INPUTS, WITHOUT CONTEXT AND MAPPING]</b></summary>

UNUSED INPUTS, WITHOUT CONTEXT AND MAPPING

</details>
30 rows
#hashhashnameqwertyxboxNote
10x4403F97FINPUT_GAME_MENU_DOWNArrow DownDpad_Down
20x911CB09EINPUT_GAME_MENU_UPArrow UpDpad_Up
30x308588E6INPUT_GAME_MENU_CANCELBackspace · EscB
40x43DBF61FINPUT_GAME_MENU_ACCEPTEnter · Numpad EnterA
50xD596CFB0INPUT_GAME_MENU_EXTRA_OPTIONFY
60x11DBBAB9INPUT_CURSOR_FORWARD_CLICKMouse_Button_1
70x9805D715INPUT_CURSOR_FORWARD_DOUBLE_CLICKMouse_Button_1
80x7630C9A1INPUT_CURSOR_FORWARD_HOLDMouse_Button_1
90x9AF38793INPUT_CURSOR_BACKWARD_CLICKMouse_Button_2
100xA14BA1FCINPUT_CURSOR_BACKWARD_DOUBLE_CLICKMouse_Button_2
110x01AA9FA1INPUT_CURSOR_BACKWARD_HOLDMouse_Button_2
120x9D2AEA88INPUT_CURSOR_ACCEPTMouse_Left_Click
130x1C559F2EINPUT_CURSOR_ACCEPT_DOUBLE_CLICKMouse_Left_Click
140xE474F150INPUT_CURSOR_ACCEPT_HOLDMouse_Left_Click
150xD6C4ECDCINPUT_CURSOR_XMouse_Move_X
160xE4130778INPUT_CURSOR_YMouse_Move_Y
170x27568539INPUT_CURSOR_CANCELMouse_Right_Click
180x9CB4ECCEINPUT_CURSOR_CANCEL_DOUBLE_CLICKMouse_Right_Click
190xD7F70F36INPUT_CURSOR_CANCEL_HOLDMouse_Right_Click
200x6AA8A71BINPUT_CURSOR_SCROLL_CLICKMouse_Scroll_Click
210xE1B6ED6DINPUT_CURSOR_SCROLL_DOUBLE_CLICKMouse_Scroll_Click
220x5484DBDDINPUT_CURSOR_SCROLL_HOLDMouse_Scroll_Click
230x8BDE7443INPUT_CURSOR_SCROLL_DOWNMouse_Scroll_Down
240x9DA42644INPUT_GAME_MENU_SCROLL_BACKWARDMouse_Scroll_Down
250xEB4130DFINPUT_FRONTEND_RIGHT_AXIS_YMouse_Scroll_Up · Mouse_Scroll_DownRS Y
260x62800C92INPUT_CURSOR_SCROLL_UPMouse_Scroll_Up
270x81457A1AINPUT_GAME_MENU_SCROLL_FORWARDMouse_Scroll_Up
280x4BC9DABBINPUT_PUSH_TO_TALKN
290xFBD7B3E6INPUT_GAME_MENU_OPTIONSpaceX
300x7DA48D2AINPUT_FRONTEND_RSXRS Click