Skip to content

Instantly share code, notes, and snippets.

@FDiskas
Last active February 27, 2023 19:59
Show Gist options
  • Save FDiskas/3dd4163d23bbdb77b54852b8cfb71720 to your computer and use it in GitHub Desktop.
Save FDiskas/3dd4163d23bbdb77b54852b8cfb71720 to your computer and use it in GitHub Desktop.

GTA:Controls for alt:v server

example code:

alt.everyTick(() => {
  native.disableControlAction(0, NativeKey.InputEnter, true);
  if(native.isDisabledControlJustReleased(0, NativeKey.InputEnter)) {
    customEnterVehicleFunction();
  }
});
// https://gist.github.com/FDiskas/3dd4163d23bbdb77b54852b8cfb71720
export const enum NativeKey {
InputNextCamera = 0, // V
InputLookLr = 1, // MOUSE RIGHT
InputLookUd = 2, // MOUSE DOWN
InputLookUpOnly = 3, // (NONE)
InputLookDownOnly = 4, // MOUSE DOWN
InputLookLeftOnly = 5, // (NONE)
InputLookRightOnly = 6, // MOUSE RIGHT
InputCinematicSlowmo = 7, // (NONE)
InputScriptedFlyUd = 8, // S
InputScriptedFlyLr = 9, // D
InputScriptedFlyZup = 10, // PAGEUP
InputScriptedFlyZdown = 11, // PAGEDOWN
InputWeaponWheelUd = 12, // MOUSE DOWN
InputWeaponWheelLr = 13, // MOUSE RIGHT
InputWeaponWheelNext = 14, // SCROLLWHEEL DOWN
InputWeaponWheelPrev = 15, // SCROLLWHEEL UP
InputSelectNextWeapon = 16, // SCROLLWHEEL DOWN
InputSelectPrevWeapon = 17, // SCROLLWHEEL UP
InputSkipCutscene = 18, // ENTER / LEFT MOUSE BUTTON / SPACEBAR
InputCharacterWheel = 19, // LEFT ALT
InputMultiplayerInfo = 20, // Z
InputSprint = 21, // LEFT SHIFT
InputJump = 22, // SPACEBAR
InputEnter = 23, // F
InputAttack = 24, // LEFT MOUSE BUTTON
InputAim = 25, // RIGHT MOUSE BUTTON
InputLookBehind = 26, // C
InputPhone = 27, // ARROW UP / SCROLLWHEEL BUTTON (PRESS)
InputSpecialAbility = 28, // (NONE)
InputSpecialAbilitySecondary = 29, // B
InputMoveLr = 30, // D
InputMoveUd = 31, // S
InputMoveUpOnly = 32, // W
InputMoveDownOnly = 33, // S
InputMoveLeftOnly = 34, // A
InputMoveRightOnly = 35, // D
InputDuck = 36, // LEFT CTRL
InputSelectWeapon = 37, // TAB
InputPickup = 38, // E
InputSniperZoom = 39, // [
InputSniperZoomInOnly = 40, // ]
InputSniperZoomOutOnly = 41, // [
InputSniperZoomInSecondary = 42, // ]
InputSniperZoomOutSecondary = 43, // [
InputCover = 44, // Q
InputReload = 45, // R
InputTalk = 46, // E
InputDetonate = 47, // G
InputHudSpecial = 48, // Z
InputArrest = 49, // F
InputAccurateAim = 50, // SCROLLWHEEL DOWN
InputContext = 51, // E
InputContextSecondary = 52, // Q
InputWeaponSpecial = 53, // (NONE)
InputWeaponSpecialTwo = 54, // E
InputDive = 55, // SPACEBAR
InputDropWeapon = 56, // F9
InputDropAmmo = 57, // F10
InputThrowGrenade = 58, // G
InputVehMoveLr = 59, // D
InputVehMoveUd = 60, // LEFT CTRL
InputVehMoveUpOnly = 61, // LEFT SHIFT
InputVehMoveDownOnly = 62, // LEFT CTRL
InputVehMoveLeftOnly = 63, // A
InputVehMoveRightOnly = 64, // D
InputVehSpecial = 65, // (NONE)
InputVehGunLr = 66, // MOUSE RIGHT
InputVehGunUd = 67, // MOUSE DOWN
InputVehAim = 68, // RIGHT MOUSE BUTTON
InputVehAttack = 69, // LEFT MOUSE BUTTON
InputVehAttack2 = 70, // RIGHT MOUSE BUTTON
InputVehAccelerate = 71, // W
InputVehBrake = 72, // S
InputVehDuck = 73, // X
InputVehHeadlight = 74, // H
InputVehExit = 75, // F
InputVehHandbrake = 76, // SPACEBAR
InputVehHotwireLeft = 77, // W
InputVehHotwireRight = 78, // S
InputVehLookBehind = 79, // C
InputVehCinCam = 80, // R
InputVehNextRadio = 81, // .
InputVehPrevRadio = 82, // ,
InputVehNextRadioTrack = 83, // =
InputVehPrevRadioTrack = 84, // -
InputVehRadioWheel = 85, // Q
InputVehHorn = 86, // E
InputVehFlyThrottleUp = 87, // W
InputVehFlyThrottleDown = 88, // S
InputVehFlyYawLeft = 89, // A
InputVehFlyYawRight = 90, // D
InputVehPassengerAim = 91, // RIGHT MOUSE BUTTON
InputVehPassengerAttack = 92, // LEFT MOUSE BUTTON
InputVehSpecialAbilityFranklin = 93, // (NONE)
InputVehStuntUd = 94, // (NONE)
InputVehCinematicUd = 95, // MOUSE DOWN
InputVehCinematicUpOnly = 96, // NUMPAD- / SCROLLWHEEL UP
InputVehCinematicDownOnly = 97, // NUMPAD+ / SCROLLWHEEL DOWN
InputVehCinematicLr = 98, // MOUSE RIGHT
InputVehSelectNextWeapon = 99, // SCROLLWHEEL UP
InputVehSelectPrevWeapon = 100, // [
InputVehRoof = 101, // H
InputVehJump = 102, // SPACEBAR
InputVehGrapplingHook = 103, // E
InputVehShuffle = 104, // H
InputVehDropProjectile = 105, // X
InputVehMouseControlOverride = 106, // LEFT MOUSE BUTTON
InputVehFlyRollLr = 107, // NUMPAD 6
InputVehFlyRollLeftOnly = 108, // NUMPAD 4
InputVehFlyRollRightOnly = 109, // NUMPAD 6
InputVehFlyPitchUd = 110, // NUMPAD 5
InputVehFlyPitchUpOnly = 111, // NUMPAD 8
InputVehFlyPitchDownOnly = 112, // NUMPAD 5
InputVehFlyUndercarriage = 113, // G
InputVehFlyAttack = 114, // RIGHT MOUSE BUTTON
InputVehFlySelectNextWeapon = 115, // SCROLLWHEEL UP
InputVehFlySelectPrevWeapon = 116, // [
InputVehFlySelectTargetLeft = 117, // NUMPAD 7
InputVehFlySelectTargetRight = 118, // NUMPAD 9
InputVehFlyVerticalFlightMode = 119, // E
InputVehFlyDuck = 120, // X
InputVehFlyAttackCamera = 121, // INSERT
InputVehFlyMouseControlOverride = 122, // LEFT MOUSE BUTTON
InputVehSubTurnLr = 123, // NUMPAD 6
InputVehSubTurnLeftOnly = 124, // NUMPAD 4
InputVehSubTurnRightOnly = 125, // NUMPAD 6
InputVehSubPitchUd = 126, // NUMPAD 5
InputVehSubPitchUpOnly = 127, // NUMPAD 8
InputVehSubPitchDownOnly = 128, // NUMPAD 5
InputVehSubThrottleUp = 129, // W
InputVehSubThrottleDown = 130, // S
InputVehSubAscend = 131, // LEFT SHIFT
InputVehSubDescend = 132, // LEFT CTRL
InputVehSubTurnHardLeft = 133, // A
InputVehSubTurnHardRight = 134, // D
InputVehSubMouseControlOverride = 135, // LEFT MOUSE BUTTON
InputVehPushbikePedal = 136, // W
InputVehPushbikeSprint = 137, // CAPSLOCK
InputVehPushbikeFrontBrake = 138, // Q
InputVehPushbikeRearBrake = 139, // S
InputMeleeAttackLight = 140, // R
InputMeleeAttackHeavy = 141, // Q
InputMeleeAttackAlternate = 142, // LEFT MOUSE BUTTON
InputMeleeBlock = 143, // SPACEBAR
InputParachuteDeploy = 144, // F / LEFT MOUSE BUTTON
InputParachuteDetach = 145, // F
InputParachuteTurnLr = 146, // D
InputParachuteTurnLeftOnly = 147, // A
InputParachuteTurnRightOnly = 148, // D
InputParachutePitchUd = 149, // S
InputParachutePitchUpOnly = 150, // W
InputParachutePitchDownOnly = 151, // S
InputParachuteBrakeLeft = 152, // Q
InputParachuteBrakeRight = 153, // E
InputParachuteSmoke = 154, // X
InputParachutePrecisionLanding = 155, // LEFT SHIFT
InputMap = 156, // (NONE)
InputSelectWeaponUnarmed = 157, // 1
InputSelectWeaponMelee = 158, // 2
InputSelectWeaponHandgun = 159, // 6
InputSelectWeaponShotgun = 160, // 3
InputSelectWeaponSmg = 161, // 7
InputSelectWeaponAutoRifle = 162, // 8
InputSelectWeaponSniper = 163, // 9
InputSelectWeaponHeavy = 164, // 4
InputSelectWeaponSpecial = 165, // 5
InputSelectCharacterMichael = 166, // F5
InputSelectCharacterFranklin = 167, // F6
InputSelectCharacterTrevor = 168, // F7
InputSelectCharacterMultiplayer = 169, // F8 (CONSOLE)
InputSaveReplayClip = 170, // F3
InputSpecialAbilityPc = 171, // CAPSLOCK
InputCellphoneUp = 172, // ARROW UP
InputCellphoneDown = 173, // ARROW DOWN
InputCellphoneLeft = 174, // ARROW LEFT
InputCellphoneRight = 175, // ARROW RIGHT
InputCellphoneSelect = 176, // ENTER / LEFT MOUSE BUTTON
InputCellphoneCancel = 177, // BACKSPACE / ESC / RIGHT MOUSE BUTTON
InputCellphoneOption = 178, // DELETE
InputCellphoneExtraOption = 179, // SPACEBAR
InputCellphoneScrollForward = 180, // SCROLLWHEEL DOWN
InputCellphoneScrollBackward = 181, // SCROLLWHEEL UP
InputCellphoneCameraFocusLock = 182, // L
InputCellphoneCameraGrid = 183, // G
InputCellphoneCameraSelfie = 184, // E
InputCellphoneCameraDof = 185, // F
InputCellphoneCameraExpression = 186, // X
InputFrontendDown = 187, // ARROW DOWN
InputFrontendUp = 188, // ARROW UP
InputFrontendLeft = 189, // ARROW LEFT
InputFrontendRight = 190, // ARROW RIGHT
InputFrontendRdown = 191, // ENTER
InputFrontendRup = 192, // TAB
InputFrontendRleft = 193, // (NONE)
InputFrontendRright = 194, // BACKSPACE
InputFrontendAxisX = 195, // D
InputFrontendAxisY = 196, // S
InputFrontendRightAxisX = 197, // ]
InputFrontendRightAxisY = 198, // SCROLLWHEEL DOWN
InputFrontendPause = 199, // P
InputFrontendPauseAlternate = 200, // ESC
InputFrontendAccept = 201, // ENTER / NUMPAD ENTER
InputFrontendCancel = 202, // BACKSPACE / ESC
InputFrontendX = 203, // SPACEBAR
InputFrontendY = 204, // TAB
InputFrontendLb = 205, // Q
InputFrontendRb = 206, // E
InputFrontendLt = 207, // PAGE DOWN
InputFrontendRt = 208, // PAGE UP
InputFrontendLs = 209, // LEFT SHIFT
InputFrontendRs = 210, // LEFT CONTROL
InputFrontendLeaderboard = 211, // TAB
InputFrontendSocialClub = 212, // HOME
InputFrontendSocialClubSecondary = 213, // HOME
InputFrontendDelete = 214, // DELETE
InputFrontendEndscreenAccept = 215, // ENTER
InputFrontendEndscreenExpand = 216, // SPACEBAR
InputFrontendSelect = 217, // CAPSLOCK
InputScriptLeftAxisX = 218, // D
InputScriptLeftAxisY = 219, // S
InputScriptRightAxisX = 220, // MOUSE RIGHT
InputScriptRightAxisY = 221, // MOUSE DOWN
InputScriptRup = 222, // RIGHT MOUSE BUTTON
InputScriptRdown = 223, // LEFT MOUSE BUTTON
InputScriptRleft = 224, // LEFT CTRL
InputScriptRright = 225, // RIGHT MOUSE BUTTON
InputScriptLb = 226, // (NONE)
InputScriptRb = 227, // (NONE)
InputScriptLt = 228, // (NONE)
InputScriptRt = 229, // LEFT MOUSE BUTTON
InputScriptLs = 230, // (NONE)
InputScriptRs = 231, // (NONE)
InputScriptPadUp = 232, // W
InputScriptPadDown = 233, // S
InputScriptPadLeft = 234, // A
InputScriptPadRight = 235, // D
InputScriptSelect = 236, // V
InputCursorAccept = 237, // LEFT MOUSE BUTTON
InputCursorCancel = 238, // RIGHT MOUSE BUTTON
InputCursorX = 239, // (NONE)
InputCursorY = 240, // (NONE)
InputCursorScrollUp = 241, // SCROLLWHEEL UP
InputCursorScrollDown = 242, // SCROLLWHEEL DOWN
InputEnterCheatCode = 243, // ~ / `
InputInteractionMenu = 244, // M
InputMpTextChatAll = 245, // T
InputMpTextChatTeam = 246, // Y
InputMpTextChatFriends = 247, // (NONE)
InputMpTextChatCrew = 248, // (NONE)
InputPushToTalk = 249, // N
InputCreatorLs = 250, // R
InputCreatorRs = 251, // F
InputCreatorLt = 252, // X
InputCreatorRt = 253, // C
InputCreatorMenuToggle = 254, // LEFT SHIFT
InputCreatorAccept = 255, // SPACEBAR
InputCreatorDelete = 256, // DELETE
InputAttack2 = 257, // LEFT MOUSE BUTTON
InputRappelJump = 258, // (NONE)
InputRappelLongJump = 259, // (NONE)
InputRappelSmashWindow = 260, // (NONE)
InputPrevWeapon = 261, // SCROLLWHEEL UP
InputNextWeapon = 262, // SCROLLWHEEL DOWN
InputMeleeAttack1 = 263, // R
InputMeleeAttack2 = 264, // Q
InputWhistle = 265, // (NONE)
InputMoveLeft = 266, // D
InputMoveRight = 267, // D
InputMoveUp = 268, // S
InputMoveDown = 269, // S
InputLookLeft = 270, // MOUSE RIGHT
InputLookRight = 271, // MOUSE RIGHT
InputLookUp = 272, // MOUSE DOWN
InputLookDown = 273, // MOUSE DOWN
InputSniperZoomIn = 274, // [
InputSniperZoomOut = 275, // [
InputSniperZoomInAlternate = 276, // [
InputSniperZoomOutAlternate = 277, // [
InputVehMoveLeft = 278, // D
InputVehMoveRight = 279, // D
InputVehMoveUp = 280, // LEFT CTRL
InputVehMoveDown = 281, // LEFT CTRL
InputVehGunLeft = 282, // MOUSE RIGHT
InputVehGunRight = 283, // MOUSE RIGHT
InputVehGunUp = 284, // MOUSE RIGHT
InputVehGunDown = 285, // MOUSE RIGHT
InputVehLookLeft = 286, // MOUSE RIGHT
InputVehLookRight = 287, // MOUSE RIGHT
InputReplayStartStopRecording = 288, // F1
InputReplayStartStopRecordingSecondary = 289, // F2
InputScaledLookLr = 290, // MOUSE RIGHT
InputScaledLookUd = 291, // MOUSE DOWN
InputScaledLookUpOnly = 292, // (NONE)
InputScaledLookDownOnly = 293, // (NONE)
InputScaledLookLeftOnly = 294, // (NONE)
InputScaledLookRightOnly = 295, // (NONE)
InputReplayMarkerDelete = 296, // DELETE
InputReplayClipDelete = 297, // DELETE
InputReplayPause = 298, // SPACEBAR
InputReplayRewind = 299, // ARROW DOWN
InputReplayFfwd = 300, // ARROW UP
InputReplayNewmarker = 301, // M
InputReplayRecord = 302, // S
InputReplayScreenshot = 303, // U
InputReplayHidehud = 304, // H
InputReplayStartpoint = 305, // B
InputReplayEndpoint = 306, // N
InputReplayAdvance = 307, // ARROW RIGHT
InputReplayBack = 308, // ARROW LEFT
InputReplayTools = 309, // T
InputReplayRestart = 310, // R
InputReplayShowhotkey = 311, // K
InputReplayCyclemarkerleft = 312, // [
InputReplayCyclemarkerright = 313, // ]
InputReplayFovincrease = 314, // NUMPAD +
InputReplayFovdecrease = 315, // NUMPAD -
InputReplayCameraup = 316, // PAGE UP
InputReplayCameradown = 317, // PAGE DOWN
InputReplaySave = 318, // F5
InputReplayToggletime = 319, // C
InputReplayToggletips = 320, // V
InputReplayPreview = 321, // SPACEBAR
InputReplayToggleTimeline = 322, // ESC
InputReplayTimelinePickupClip = 323, // X
InputReplayTimelineDuplicateClip = 324, // C
InputReplayTimelinePlaceClip = 325, // V
InputReplayCtrl = 326, // LEFT CTRL
InputReplayTimelineSave = 327, // F5
InputReplayPreviewAudio = 328, // SPACEBAR
InputVehDriveLook = 329, // LEFT MOUSE BUTTON
InputVehDriveLook2 = 330, // RIGHT MOUSE BUTTON
InputVehFlyAttack2 = 331, // RIGHT MOUSE BUTTON
InputRadioWheelUd = 332, // MOUSE DOWN
InputRadioWheelLr = 333, // MOUSE RIGHT
InputVehSlowmoUd = 334, // SCROLLWHEEL DOWN
InputVehSlowmoUpOnly = 335, // SCROLLWHEEL UP
InputVehSlowmoDownOnly = 336, // SCROLLWHEEL DOWN
InputVehHydraulicsControlToggle = 337, // X
InputVehHydraulicsControlLeft = 338, // A
InputVehHydraulicsControlRight = 339, // D
InputVehHydraulicsControlUp = 340, // LEFT SHIFT
InputVehHydraulicsControlDown = 341, // LEFT CTRL
InputVehHydraulicsControlUd = 342, // D
InputVehHydraulicsControlLr = 343, // LEFT CTRL
InputSwitchVisor = 344, // F11
InputVehMeleeHold = 345, // X
InputVehMeleeLeft = 346, // LEFT MOUSE BUTTON
InputVehMeleeRight = 347, // RIGHT MOUSE BUTTON
InputMapPoi = 348, // SCROLLWHEEL BUTTON (PRESS)
InputReplaySnapmaticPhoto = 349, // TAB
InputVehCarJump = 350, // E
InputVehRocketBoost = 351, // E
InputVehFlyBoost = 352, // LEFT SHIFT
InputVehParachute = 353, // SPACEBAR
InputVehBikeWings = 354, // X
InputVehFlyBombBay = 355, // E
InputVehFlyCounter = 356, // E
InputVehTransform = 357, // X
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment