Lua variables in Logitech macros
Contents
- Activation and controls
- OFF_ON_MACROS_KEY
- LANGUAGE
- HELP_MODE
- REQUIRE_RMB
- ONE_TAP_MODE
- OFF_ON_CTRL_MODE
- CLICKER_ACTIVATION_BUTTON
- AUTO_MODE_KEY
- %WeaponName%_G_BUTTON
- Compensation and sensitivity
- MACROS_COMPENSATION
- R_SPEED
- COMPENSATION_ONLY_CTRL
- MODULES_FACTOR
- MODULES_FACTOR_POWER
- %WeaponName%_POWER
- INVERSION
- Randomness
- RANDOM_XY_MODE
- RANDOM_XY_VALUE
- RANDOM_DELAY_MODE
- AVL_SPRAY
- Mouse buttons and the attachments G key
- MOUSE_BUTTON_ONE
- MOUSE_BUTTON_TWO
- MOUSE_BUTTON_THREE
- MOUSE_BUTTON_FOUR
- MOUSE_BUTTON_FIVE
- MODULES_G_BUTTON
- G.MACRO startup settings
- DEFAULT_SENSITIVITY_X
- DEFAULT_SENSITIVITY_Y
- DEFAULT_DELAY_MS
- INVERSION_X
- INVERSION_Y
- CLICKER_MODE
- SECOND_AUTO_BUTTON
- HUMAN_RANDOM
- CoD EDITION mode presets
- MODE_1_SENSITIVITY_X
- MODE_1_SENSITIVITY_Y
- MODE_1_DELAY_MS
- MODE_1_CLICKER_MODE
- MODE_1_HUMAN_RANDOM
- MODE_2_SENSITIVITY_X
- MODE_2_SENSITIVITY_Y
- MODE_2_DELAY_MS
- MODE_2_CLICKER_MODE
- MODE_2_HUMAN_RANDOM
- CoD EDITION G keys
- VERTICAL_SENS_PLUS_G_BUTTON
- VERTICAL_SENS_MINUS_G_BUTTON
- HORIZONTAL_SENS_PLUS_G_BUTTON
- HORIZONTAL_SENS_MINUS_G_BUTTON
- DELAY_PLUS_G_BUTTON
- DELAY_MINUS_G_BUTTON
- MODE_CHANGER_G_BUTTON
- HUMAN_RANDOM_G_BUTTON
- CLICKER_G_BUTTON
- SHOW_SETTINGS_G_BUTTON
- Legacy variables
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 or jump to 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 (value "capslock"); you can change it to "numlock" or "scrolllock".
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: Russian ("RU") or English ("EN").
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. On by default; set to false to turn it off.
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.
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.
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.
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).
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).
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. 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, 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.
local MACROS_COMPENSATION = "scrolllock"
Takes the values "capslock", "scrolllock" or "numlock".
R_SPEED
The compensation speed when MACROS_COMPENSATION is on. Default: 12.
local R_SPEED = 12
COMPENSATION_ONLY_CTRL
Limits MACROS_COMPENSATION: compensation works only while crouching. Default: false.
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 variable.
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 is on (true).
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.
local SKS_POWER = 44
local M16A4_POWER = 27
local MINI14_POWER = 40
local DRAGUNOV_POWER = 55
local SLR_POWER = 52
local MK12_POWER = 50
local MK47_MUTANT_POWER = 27
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 key.
INVERSION
Inverts the macros on the vertical axis (with true). You need it if you play with mouse inversion. Default: false.
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.
local RANDOM_XY_MODE = false
RANDOM_XY_VALUE
The size of the random deviations for RANDOM_XY_MODE. Recommended values: 0.8 to 1.2 (for the latest pack versions).
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.
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.
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 sets the initial state. MODULES_FACTOR_POWER sets the multiplier.
G.MACRO startup settings
The available settings depend on the edition of the universal G.MACRO script. 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 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 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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.
mouseButtonFour
Event number for mouse button 4. Current name — MOUSE_BUTTON_FOUR.
mouseButtonThree
Event number for a mouse wheel click. Current name — MOUSE_BUTTON_THREE.
CAR_G_Button
G key for selecting the CAR. Current name — CAR_G_BUTTON.
R_301_G_Button
G key for selecting the R-301. Current name — R_301_G_BUTTON.
VK47_FLATLINE_G_Button
G key for selecting the Flatline. Current name — FLATLINE_G_BUTTON.
SHOW_STAGES_STEPS
Shows the steps of the running macro in the Logitech G HUB script console.
local SHOW_STAGES_STEPS = true
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; with true you first hold the RMB (aim), then the LMB.
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.
local T_MODE = false
If you hold the LMB with T_MODE on, macros work in PRO mode 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.
local INVERSION_AXIS_Y = false
This setting uses true and false. In G.MACRO, the numeric setting INVERSION_Y takes 1 or -1.
DELAY_RANDOM_GAP
A 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.
local DELAY_RANDOM_GAP = 2
OX_RANDOM_GAP
A HUMAN_RANDOM parameter: the amount of randomness in macro movements on the horizontal axis.
local OX_RANDOM_GAP = 1
OY_RANDOM_GAP
A HUMAN_RANDOM parameter: the amount of randomness in macro movements on the vertical axis.
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.
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.
local HUMAN_RANDOM = false
The amount of randomness is set by DELAY_RANDOM_GAP, OX_RANDOM_GAP and OY_RANDOM_GAP.
For G.MAXIMAL, see HUMAN_RANDOM.
