# Lua variables in Logitech macros

> Look up current and legacy Lua settings for Logitech G HUB packs. Find each variable’s purpose, default value and new name when upgrading.

URL: https://promacro.ru/en/knowledge-base/lua-variables/
Updated: 2026-11-21

The settings at the top of a Logitech G HUB `Lua` script depend on the program. This guide lists the exact variable names for game packs, universal G.MACRO scripts and CoD EDITION. Keep the capitalization shown when editing a setting.

To change a setting, open the script in G HUB, change the variable's value, then **save the script and run it again**: changes don't apply until you do. The set of variables depends on the pack and its version.

Copy the name from the settings at the top of your script and use `Ctrl+F` to find it here. Start with [current settings](#control) or jump to [legacy variables](#legacy-variables). When upgrading, copy the value into the corresponding line in the new file. In an older script, use the name already in its header.

## Activation and controls
### OFF_ON_MACROS_KEY
The key that turns macros on globally. By default it's [CapsLock](https://promacro.ru/en/knowledge-base/terms/#capslock) (value `"capslock"`); you can change it to `"numlock"` or `"scrolllock"`.

```lua
local OFF_ON_MACROS_KEY = "capslock"
```

Available in the game packs and CoD EDITION. Turn the selected lock key on to fire.

### LANGUAGE
The language of the messages in the [G HUB console](https://promacro.ru/en/knowledge-base/terms/#g-hub-console): Russian (`"RU"`) or English (`"EN"`).

```lua
local LANGUAGE = "EN"
```

The current files ship with `"RU"`. The example selects English.

### HELP_MODE
Help mode: pressing the mouse wheel prints basic instructions for the `Lua` program in the [G HUB console](https://promacro.ru/en/knowledge-base/terms/#g-hub-console). On by default; set to `false` to turn it off.

```lua
local HELP_MODE = true
```

### REQUIRE_RMB
In every Apex Legends and PUBG edition, this controls whether firing requires the right mouse button. With `true` (the default), hold RMB and press LMB. With `false`, LMB alone is enough.

```lua
local REQUIRE_RMB = true
```

### ONE_TAP_MODE
A one-shot firing mode in the CS2 packs. With `true`, the first shot does not trigger the macro instantly, which lets you fire in the **ONE TAP** style without a sharp mouse movement immediately after pressing the button. Off by default.

```lua
local ONE_TAP_MODE = false
```

### OFF_ON_CTRL_MODE
Makes macros work **only while crouching**: in many games that's the most effective position for shooting with macros. Default: `false`.

```lua
local OFF_ON_CTRL_MODE = false
```

### CLICKER_ACTIVATION_BUTTON
In CS2 MAX, sets the modifier to hold when firing in the selected CLICKER mode. The default is `"lalt"` (left Alt).

```lua
local CLICKER_ACTIVATION_BUTTON = "lalt"
```

### AUTO_MODE_KEY
In PUBG STANDARD and MAX, hold this modifier while firing to repeat shots with semi-automatic weapons. The default is `"lalt"` (left Alt).

```lua
local AUTO_MODE_KEY = "lalt"
```

### %WeaponName%_G_BUTTON
Assigns a weapon mode to a G key of a Logitech keyboard. `0` (default) means no key; `1`–`12` is the G key number: `1` is G1, `2` is G2 and so on (the G213 Prodigy, for example, has 12).

If any `G_BUTTON` variable is not `0`, the standard keyboard + mouse combination for that weapon **is turned off**.

Before assigning G keys, [set them up in G HUB and bind separate macros to them](https://promacro.ru/en/knowledge-base/terms/#g-keys). How many G keys a keyboard has and whether they can be bound to `Lua` scripts, only **Logitech support** can tell you in advance: even G keys listed in the keyboard's specs **don't guarantee they'll work in `Lua` scripts**.

The bindings below are listed by edition. STANDARD includes the MINI weapons, and MAX includes the STANDARD weapons. Each binding defaults to `0`.

**Apex Legends**

- MINI — `CAR_G_BUTTON`, `FLATLINE_G_BUTTON`, `R_301_G_BUTTON`, `VOLT_G_BUTTON`.
- Added in STANDARD — `ALTERNATOR_G_BUTTON`, `HAVOC_G_BUTTON`, `NEMESIS_G_BUTTON`, `PROWLER_BURST_G_BUTTON`, `RE_45_G_BUTTON`, `R_99_G_BUTTON`.
- Added in MAX — `ALTERNATOR_X2_G_BUTTON`, `DEVOTION_G_BUTTON`, `HAVOC_TURBO_G_BUTTON`, `HEMLOK_G_BUTTON`, `L_STAR_G_BUTTON`, `M600_SPITFIRE_G_BUTTON`, `RAMPAGE_G_BUTTON`.

**PUBG**

- MINI — `AKM_G_BUTTON`, `M416_G_BUTTON`, `SCAR_L_G_BUTTON`, `UMP45_G_BUTTON`, `VECTOR_G_BUTTON`.
- Added in STANDARD — `BERYL_M762_G_BUTTON`, `DRAGUNOV_G_BUTTON`, `FAMAS_G_BUTTON`, `M16A4_G_BUTTON`, `MINI14_G_BUTTON`, `MK12_G_BUTTON`, `MK14_G_BUTTON`, `RPD_G_BUTTON`, `SKS_G_BUTTON`, `SLR_G_BUTTON`, `VSS_G_BUTTON`.
- Added in MAX — `ACE32_G_BUTTON`, `AUG_G_BUTTON`, `G36C_G_BUTTON`, `GROZA_G_BUTTON`, `JS9_G_BUTTON`, `K2_G_BUTTON`, `M249_G_BUTTON`, `MG3_660_G_BUTTON`, `MG3_990_G_BUTTON`, `MICRO_UZI_G_BUTTON`, `MK47_MUTANT_G_BUTTON`, `MP5K_G_BUTTON`, `MP9_G_BUTTON`, `P90_G_BUTTON`, `QBZ_G_BUTTON`, `TOMMY_GUN_G_BUTTON`.

**CS2**

- MINI — `AK47_G_BUTTON`, `FAMAS_G_BUTTON`, `GALIL_G_BUTTON`, `M4A4_G_BUTTON`.
- Added in STANDARD — `M4A1_S_G_BUTTON`, `MAC_10_G_BUTTON`, `MP9_G_BUTTON`.
- Added in MAX — `AUG_G_BUTTON`, `AWP_SSG_G_BUTTON`, `BIZON_G_BUTTON`, `CLICKER_G_BUTTON`, `MP5SD_G_BUTTON`, `MP7_G_BUTTON`, `P90_G_BUTTON`, `SG553_G_BUTTON`, `UMP45_G_BUTTON`.

## Compensation and sensitivity
### MACROS_COMPENSATION
After you release the [LMB](https://promacro.ru/en/knowledge-base/terms/#lmb), returns the crosshair to where it would have been without the macro: macros move the mouse, and when you stop firing those movements are compensated.

```lua
local MACROS_COMPENSATION = "scrolllock"
```

Takes the values `"capslock"`, `"scrolllock"` or `"numlock"`.

### R_SPEED
The compensation speed when [MACROS_COMPENSATION](#macros-compensation) is on. Default: `12`.

```lua
local R_SPEED = 12
```

### COMPENSATION_ONLY_CTRL
Limits [MACROS_COMPENSATION](#macros-compensation): compensation works **only while crouching**. Default: `false`.

```lua
local COMPENSATION_ONLY_CTRL = false
```

### MODULES_FACTOR
Turns on the attachments multiplier, to **raise or lower the sensitivity of all macros** with the [MODULES_FACTOR_POWER](#modules-factor-power) variable.

```lua
local MODULES_FACTOR = false
```

It's also a way to adapt macros to non-standard game settings.

### MODULES_FACTOR_POWER
The sensitivity of all macros in the pack: the higher the value, the more the macros move the crosshair. Works only when [MODULES_FACTOR](#modules-factor) is on (`true`).

```lua
local MODULES_FACTOR_POWER = 0.76
```

If you use attachments that reduce recoil, lower the value until the macro stops pulling the crosshair down for that weapon.

We **don't recommend** this feature unless you fully understand how it works and are sure you need it: **if you follow the game settings and attachment requirements**, you'll almost always get **the same or a better result**.

### %WeaponName%_POWER
The strength of recoil compensation in "ONE TAP" mode, that is, single shots from a semi-automatic weapon. The default value matches the crosshair shift on the first shot; each such weapon has its own variable.

<div class="code-cols">

```lua
local SKS_POWER = 44
local M16A4_POWER = 27
local MINI14_POWER = 40
local DRAGUNOV_POWER = 55
```

```lua
local SLR_POWER = 52
local MK12_POWER = 50
local MK47_MUTANT_POWER = 27
```

</div>

If the compensation isn't enough (you click faster than the weapon returns to its original position), raise the value for that weapon; if the crosshair goes down, lower it. Full-auto fire from a semi-automatic weapon is turned on with the [AUTO_MODE_KEY](#auto-mode-key) key.

### INVERSION
Inverts the macros on the vertical axis (with `true`). You need it if you play with **mouse inversion**. Default: `false`.

```lua
local INVERSION = false
```

## Randomness
### RANDOM_XY_MODE
Set to `true` to add small random variations to mouse movements on the X and Y axes. Defaults to `false` in current Apex Legends, PUBG and CS2 packs.

```lua
local RANDOM_XY_MODE = false
```

### RANDOM_XY_VALUE
The size of the random deviations for [RANDOM_XY_MODE](#random-xy-mode). Recommended values: `0.8` to `1.2` (for the latest pack versions).

```lua
local RANDOM_XY_VALUE = 1
```

### RANDOM_DELAY_MODE
Adds small random values to the delays in macros (with `true`). Not recommended without [RANDOM_XY_MODE](#random-xy-mode).

```lua
local RANDOM_DELAY_MODE = false
```

### AVL_SPRAY
Leaves the macro in control of the horizontal recoil only, the hardest part, while you handle the vertical recoil yourself (with `true`). Works like [AVL macros for A4Tech mice](https://promacro.ru/en/knowledge-base/macro-formats/#avl).

```lua
local AVL_SPRAY = false
```

## Mouse buttons and the attachments G key
In Logitech game packs, `MOUSE_BUTTON_*` settings give the `OnEvent` button number the script expects in a weapon-selection shortcut. G HUB uses different button numbers depending on the function. For `OnEvent`, the right button is `2` and a wheel click is `3`. For `IsMouseButtonPressed`, they are `3` and `2`, respectively.

### MOUSE_BUTTON_ONE
The G HUB event number for the left button in weapon-selection shortcuts. Defaults to `1`. Available in PUBG STANDARD and MAX.

### MOUSE_BUTTON_TWO
The G HUB event number for the right button in weapon-selection shortcuts. Defaults to `2`. Available in PUBG STANDARD and MAX.

### MOUSE_BUTTON_THREE
The G HUB event number for the wheel click in weapon-selection shortcuts. Defaults to `3`. Available in all PUBG packs, plus STANDARD and MAX for Apex Legends and CS2.

### MOUSE_BUTTON_FOUR
The G HUB event number for the side button 4 in weapon-selection shortcuts. Defaults to `4`. Available in MINI, STANDARD and MAX for Apex Legends, PUBG and CS2.

### MOUSE_BUTTON_FIVE
The G HUB event number for the side button 5 in weapon-selection shortcuts. Defaults to `5`. Available in MINI, STANDARD and MAX for Apex Legends, PUBG and CS2.

### MODULES_G_BUTTON
Assigns a G key to toggle the attachments multiplier in PUBG MINI, STANDARD and MAX. With the default `0`, hold right Shift and right Ctrl and press the button set by `MOUSE_BUTTON_THREE` (the wheel by default). Assigning a G key number replaces that shortcut.

[MODULES_FACTOR](#modules-factor) sets the initial state. [MODULES_FACTOR_POWER](#modules-factor-power) sets the multiplier.

## G.MACRO startup settings
The available settings depend on the edition of the [universal G.MACRO script](https://promacro.ru/en/universal-macros-logitech-g/). For example, G.MINIMAL lets you set the initial movement on the vertical axis only.

### DEFAULT_SENSITIVITY_X
Initial horizontal movement per step in G.STANDARD, G.PROFESSIONAL and G.MAXIMAL. Takes an integer. The default `0` means no movement along this axis.

### DEFAULT_SENSITIVITY_Y
Initial vertical movement per step in G.MINIMAL, G.STANDARD, G.PROFESSIONAL and G.MAXIMAL. Takes an integer. The default `0` means no movement along this axis.

### DEFAULT_DELAY_MS
Initial delay between movements in G.PROFESSIONAL and G.MAXIMAL. Use a whole number of milliseconds, starting at `1`. The default is `15` ms.

### INVERSION_X
Sets the direction of horizontal movement in G.PROFESSIONAL, G.MAXIMAL and CoD EDITION. The default `1` keeps the original direction, and `-1` reverses it.

### INVERSION_Y
Sets the direction of vertical movement in G.PROFESSIONAL, G.MAXIMAL and CoD EDITION. The default `1` keeps the original direction, and `-1` reverses it.

### CLICKER_MODE
Enables the clicker when G.MAXIMAL starts if set to `true`. Defaults to `false`. With the clicker enabled, hold the left mouse button and the modifier set by `SECOND_AUTO_BUTTON` for repeated clicks.

### SECOND_AUTO_BUTTON
The modifier to hold with the left mouse button for repeated clicks when the G.MAXIMAL clicker is enabled. Defaults to `"lalt"` (left Alt). Use `"ralt"` for right Alt or `"alt"` for either Alt key.

### HUMAN_RANDOM
Enables additional random variation when G.MAXIMAL starts if set to `true`. Defaults to `false`.

## CoD EDITION mode presets
[G.MACRO Call of Duty Edition](https://promacro.ru/en/macros-for-call-of-duty/) starts in Mode 1. Whenever you switch modes, the script reloads the five settings for the selected mode from the file. If you adjust the delay with a button during use, switching away and back restores the delay from that preset.

### MODE_1_SENSITIVITY_X
Sets the initial horizontal movement per step for CoD EDITION Mode 1. Defaults to `0`.

### MODE_1_SENSITIVITY_Y
Sets the initial vertical movement per step for CoD EDITION Mode 1. Defaults to `10`.

### MODE_1_DELAY_MS
Sets the delay between movements in milliseconds for CoD EDITION Mode 1. The minimum is `1` and the default is `25`.

### MODE_1_CLICKER_MODE
Sets the initial clicker setting for CoD EDITION Mode 1. Set to `true` to enable the clicker. Defaults to `false`.

### MODE_1_HUMAN_RANDOM
Sets the initial setting for additional random variation for CoD EDITION Mode 1. Set to `true` to enable it. Defaults to `false`.

### MODE_2_SENSITIVITY_X
Sets the initial horizontal movement per step for CoD EDITION Mode 2. Defaults to `0`.

### MODE_2_SENSITIVITY_Y
Sets the initial vertical movement per step for CoD EDITION Mode 2. Defaults to `5`.

### MODE_2_DELAY_MS
Sets the delay between movements in milliseconds for CoD EDITION Mode 2. The minimum is `1` and the default is `15`.

### MODE_2_CLICKER_MODE
Sets the initial clicker setting for CoD EDITION Mode 2. Set to `true` to enable the clicker. Defaults to `false`.

### MODE_2_HUMAN_RANDOM
Sets the initial setting for additional random variation for CoD EDITION Mode 2. Set to `true` to enable it. Defaults to `false`.

## CoD EDITION G keys
To replace the standard shortcut for one function, set its variable to a Logitech G key number. For example, `2` assigns G2. Other functions keep their own bindings.

### VERTICAL_SENS_PLUS_G_BUTTON
The number of the G key that increases vertical movement by 1 in CoD EDITION. The default `0` keeps the left Alt + button 5 shortcut.

### VERTICAL_SENS_MINUS_G_BUTTON
The number of the G key that decreases vertical movement by 1 in CoD EDITION. The default `0` keeps the left Alt + button 4 shortcut.

### HORIZONTAL_SENS_PLUS_G_BUTTON
The number of the G key that increases horizontal movement by 1 in CoD EDITION. The default `0` keeps the left Ctrl + button 5 shortcut.

### HORIZONTAL_SENS_MINUS_G_BUTTON
The number of the G key that decreases horizontal movement by 1 in CoD EDITION. The default `0` keeps the left Ctrl + button 4 shortcut.

### DELAY_PLUS_G_BUTTON
The number of the G key that increases the delay between movements by 1 ms in CoD EDITION. The default `0` keeps the left Shift + button 5 shortcut.

### DELAY_MINUS_G_BUTTON
The number of the G key that decreases the delay between movements by 1 ms, down to a minimum of 1 ms in CoD EDITION. The default `0` keeps the left Shift + button 4 shortcut.

### MODE_CHANGER_G_BUTTON
The number of the G key that switches between Mode 1 and Mode 2 in CoD EDITION. The default `0` keeps the right Shift + wheel click shortcut.

### HUMAN_RANDOM_G_BUTTON
The number of the G key that toggles additional random variation in CoD EDITION. The default `0` keeps the left Alt + wheel click shortcut.

### CLICKER_G_BUTTON
The number of the G key that toggles the clicker for the current mode in CoD EDITION. The default `0` keeps the left Ctrl + wheel click shortcut. In CS2 MAX the same name assigns a G key to select CLICKER mode. The default `0` keeps the standard shortcut.

### SHOW_SETTINGS_G_BUTTON
The number of the G key that prints the current settings to the G HUB console in CoD EDITION. The default `0` keeps the left Shift + wheel click shortcut.

## Legacy variables
Match the spelling to the file you use. Renamed settings below link to their current names. Settings specific to older scripts include their original values and examples.

### IN_SIGHT_MODE
The former name of [`REQUIRE_RMB`](https://promacro.ru/en/knowledge-base/lua-variables/#require-rmb) in Apex Legends and PUBG. With `true`, hold RMB and press LMB. With `false`, LMB alone is enough. The default is `true`.

### defaultSensitivityAxisX
In an earlier version, this is the name for [`DEFAULT_SENSITIVITY_X`](https://promacro.ru/en/knowledge-base/lua-variables/#default-sensitivity-x). Initial horizontal movement per step in G.STANDARD, G.PROFESSIONAL and G.MAXIMAL. Takes an integer. The default `0` means no movement along this axis.

### defaultSensitivityAxisY
In an earlier version, this is the name for [`DEFAULT_SENSITIVITY_Y`](https://promacro.ru/en/knowledge-base/lua-variables/#default-sensitivity-y). Initial vertical movement per step in G.MINIMAL, G.STANDARD, G.PROFESSIONAL and G.MAXIMAL. Takes an integer. The default `0` means no movement along this axis.

### defaultProDelay
In an earlier version, this is the name for [`DEFAULT_DELAY_MS`](https://promacro.ru/en/knowledge-base/lua-variables/#default-delay-ms). Initial delay between movements in G.PROFESSIONAL and G.MAXIMAL. Use a whole number of milliseconds, starting at `1`. The default is `15` ms.

### inversionAxisX
In an earlier version, this is the name for [`INVERSION_X`](https://promacro.ru/en/knowledge-base/lua-variables/#inversion-x). Sets the direction of horizontal movement in G.PROFESSIONAL, G.MAXIMAL and CoD EDITION. The default `1` keeps the original direction, and `-1` reverses it.

### inversionAxisY
In an earlier version, this is the name for [`INVERSION_Y`](https://promacro.ru/en/knowledge-base/lua-variables/#inversion-y). Sets the direction of vertical movement in G.PROFESSIONAL, G.MAXIMAL and CoD EDITION. The default `1` keeps the original direction, and `-1` reverses it.

### clickerMode
In an earlier version, this is the name for [`CLICKER_MODE`](https://promacro.ru/en/knowledge-base/lua-variables/#clicker-mode). Enables the clicker when G.MAXIMAL starts if set to `true`. Defaults to `false`. With the clicker enabled, hold the left mouse button and the modifier set by `secondAutoButton` for repeated clicks.

### secondAutoButton
In an earlier version, this is the name for [`SECOND_AUTO_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#current-second-auto-button). The modifier to hold with the left mouse button for repeated clicks when the G.MAXIMAL clicker is enabled. Defaults to `"lalt"` (left Alt). Use `"ralt"` for right Alt or `"alt"` for either Alt key.

### humanRandom
In an earlier version, this is the name for [`HUMAN_RANDOM`](https://promacro.ru/en/knowledge-base/lua-variables/#g-maximal-human-random). Enables additional random variation when G.MAXIMAL starts if set to `true`. Defaults to `false`.

### mode1SensitivityAxisX
In an earlier version, this is the name for [`MODE_1_SENSITIVITY_X`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-1-sensitivity-x). Sets the initial horizontal movement per step for CoD EDITION Mode 1. Defaults to `0`.

### mode1SensitivityAxisY
In an earlier version, this is the name for [`MODE_1_SENSITIVITY_Y`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-1-sensitivity-y). Sets the initial vertical movement per step for CoD EDITION Mode 1. Defaults to `10`.

### mode1ProDelay
In an earlier version, this is the name for [`MODE_1_DELAY_MS`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-1-delay-ms). Sets the delay between movements in milliseconds for CoD EDITION Mode 1. The minimum is `1` and the default is `25`.

### mode1ClickerMode
In an earlier version, this is the name for [`MODE_1_CLICKER_MODE`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-1-clicker-mode). Sets the initial clicker setting for CoD EDITION Mode 1. Set to `true` to enable the clicker. Defaults to `false`.

### mode1HumanRandom
In an earlier version, this is the name for [`MODE_1_HUMAN_RANDOM`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-1-human-random). Sets the initial setting for additional random variation for CoD EDITION Mode 1. Set to `true` to enable it. Defaults to `false`.

### mode2SensitivityAxisX
In an earlier version, this is the name for [`MODE_2_SENSITIVITY_X`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-2-sensitivity-x). Sets the initial horizontal movement per step for CoD EDITION Mode 2. Defaults to `0`.

### mode2SensitivityAxisY
In an earlier version, this is the name for [`MODE_2_SENSITIVITY_Y`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-2-sensitivity-y). Sets the initial vertical movement per step for CoD EDITION Mode 2. Defaults to `5`.

### mode2ProDelay
In an earlier version, this is the name for [`MODE_2_DELAY_MS`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-2-delay-ms). Sets the delay between movements in milliseconds for CoD EDITION Mode 2. The minimum is `1` and the default is `15`.

### mode2ClickerMode
In an earlier version, this is the name for [`MODE_2_CLICKER_MODE`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-2-clicker-mode). Sets the initial clicker setting for CoD EDITION Mode 2. Set to `true` to enable the clicker. Defaults to `false`.

### mode2HumanRandom
In an earlier version, this is the name for [`MODE_2_HUMAN_RANDOM`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-2-human-random). Sets the initial setting for additional random variation for CoD EDITION Mode 2. Set to `true` to enable it. Defaults to `false`.

### Vertical_Sens_Plus_G_Button
In an earlier version, this is the name for [`VERTICAL_SENS_PLUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#vertical-sens-plus-g-button). The number of the G key that increases vertical movement by 1 in CoD EDITION. The default `0` keeps the left Alt + button 5 shortcut.

### Vertical_Sens_Minus_G_Button
In an earlier version, this is the name for [`VERTICAL_SENS_MINUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#vertical-sens-minus-g-button). The number of the G key that decreases vertical movement by 1 in CoD EDITION. The default `0` keeps the left Alt + button 4 shortcut.

### Horizontal_Sens_Plus_G_Button
In an earlier version, this is the name for [`HORIZONTAL_SENS_PLUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#horizontal-sens-plus-g-button). The number of the G key that increases horizontal movement by 1 in CoD EDITION. The default `0` keeps the left Ctrl + button 5 shortcut.

### Horizontal_Sens_Minus_G_Button
In an earlier version, this is the name for [`HORIZONTAL_SENS_MINUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#horizontal-sens-minus-g-button). The number of the G key that decreases horizontal movement by 1 in CoD EDITION. The default `0` keeps the left Ctrl + button 4 shortcut.

### Delay_Plus_G_Button
In an earlier version, this is the name for [`DELAY_PLUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#delay-plus-g-button). The number of the G key that increases the delay between movements by 1 ms in CoD EDITION. The default `0` keeps the left Shift + button 5 shortcut.

### Delay_Minus_G_Button
In an earlier version, this is the name for [`DELAY_MINUS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#delay-minus-g-button). The number of the G key that decreases the delay between movements by 1 ms, down to a minimum of 1 ms in CoD EDITION. The default `0` keeps the left Shift + button 4 shortcut.

### Mode_Changer_G_Button
In an earlier version, this is the name for [`MODE_CHANGER_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#mode-changer-g-button). The number of the G key that switches between Mode 1 and Mode 2 in CoD EDITION. The default `0` keeps the right Shift + wheel click shortcut.

### Human_Random_G_Button
In an earlier version, this is the name for [`HUMAN_RANDOM_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#human-random-g-button). The number of the G key that toggles additional random variation in CoD EDITION. The default `0` keeps the left Alt + wheel click shortcut.

### Clicker_G_Button
In an earlier version, this is the name for [`CLICKER_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#clicker-g-button). The number of the G key that toggles the clicker for the current mode in CoD EDITION. The default `0` keeps the left Ctrl + wheel click shortcut.

### Show_Settings_G_Button
In an earlier version, this is the name for [`SHOW_SETTINGS_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#show-settings-g-button). The number of the G key that prints the current settings to the G HUB console in CoD EDITION. The default `0` keeps the left Shift + wheel click shortcut.

### mouseButtonFive
Event number for mouse button 5. Current name — [`MOUSE_BUTTON_FIVE`](https://promacro.ru/en/knowledge-base/lua-variables/#mouse-button-five).

### mouseButtonFour
Event number for mouse button 4. Current name — [`MOUSE_BUTTON_FOUR`](https://promacro.ru/en/knowledge-base/lua-variables/#mouse-button-four).

### mouseButtonThree
Event number for a mouse wheel click. Current name — [`MOUSE_BUTTON_THREE`](https://promacro.ru/en/knowledge-base/lua-variables/#mouse-button-three).

### CAR_G_Button
G key for selecting the CAR. Current name — [`CAR_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#weaponname-g-button).

### R_301_G_Button
G key for selecting the R-301. Current name — [`R_301_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#weaponname-g-button).

### VK47_FLATLINE_G_Button
G key for selecting the Flatline. Current name — [`FLATLINE_G_BUTTON`](https://promacro.ru/en/knowledge-base/lua-variables/#weaponname-g-button).

### SHOW_STAGES_STEPS
Shows the steps of the running macro in the Logitech G HUB script console.

```lua
local SHOW_STAGES_STEPS = true
```

```text
Stage: 2
Total steps: 40
```

### RMB_MODE
Makes macros work with the right + left mouse buttons (aiming mode). With `false` macros run while you hold the [LMB](https://promacro.ru/en/knowledge-base/terms/#lmb); with `true` you first hold the RMB (aim), then the LMB.

```lua
local RMB_MODE = false
```

RMB + LMB is more convenient: macros don't fire during ordinary LMB actions (inventory and other interactions), so you don't have to turn them off with CapsLock.

### T_MODE
A mode for tapping, that is, firing one shot at a time: with `true`, single shots don't trigger the macro. Off by default.

```lua
local T_MODE = false
```

If you hold the [LMB](https://promacro.ru/en/knowledge-base/terms/#lmb) with T_MODE on, macros work in [PRO mode](https://promacro.ru/en/knowledge-base/macro-formats/#pro) as usual, with a small "jump" after the first shot. If you don't tap often, keep this mode off.

### INVERSION_AXIS_Y
Inverts all macros on the vertical axis (Y). Only needed if you play with vertical mouse inversion.

```lua
local INVERSION_AXIS_Y = false
```

This setting uses `true` and `false`. In G.MACRO, the numeric setting [`INVERSION_Y`](https://promacro.ru/en/knowledge-base/lua-variables/#inversion-y) takes `1` or `-1`.

### DELAY_RANDOM_GAP
A [HUMAN_RANDOM](https://promacro.ru/en/knowledge-base/lua-variables/#human-random) parameter: the maximum random addition to the delays between macro movements, in milliseconds. Recommended value: the time between two shots divided by 20, which is 2 to 6 ms on average.

```lua
local DELAY_RANDOM_GAP = 2
```

### OX_RANDOM_GAP
A [HUMAN_RANDOM](https://promacro.ru/en/knowledge-base/lua-variables/#human-random) parameter: the amount of randomness in macro movements on the horizontal axis.

```lua
local OX_RANDOM_GAP = 1
```

### OY_RANDOM_GAP
A [HUMAN_RANDOM](https://promacro.ru/en/knowledge-base/lua-variables/#human-random) parameter: the amount of randomness in macro movements on the vertical axis.

```lua
local OY_RANDOM_GAP = 1
```

### AVL_RANDOM
Adds a little randomness to the recoil of all macros in the `Lua` program (with `true`). Recoil may grow slightly.

```lua
local AVL_RANDOM = false
```

### HUMAN_RANDOM in scripts with GAP settings
In older scripts with `DELAY_RANDOM_GAP`, `OX_RANDOM_GAP` and `OY_RANDOM_GAP`, this switch controls random variation in movement and delays. Use `true` to enable it or `false` to disable it.

```lua
local HUMAN_RANDOM = false
```

The amount of randomness is set by [DELAY_RANDOM_GAP](#delay-random-gap), [OX_RANDOM_GAP](#ox-random-gap) and [OY_RANDOM_GAP](#oy-random-gap).

For G.MAXIMAL, see [`HUMAN_RANDOM`](https://promacro.ru/en/knowledge-base/lua-variables/#g-maximal-human-random).
