# Macros for Call of Duty

> Set up G.MACRO Call of Duty Edition in Logitech G HUB, switch between two presets and assign controls to keyboard G keys.

URL: https://promacro.ru/en/macros-for-call-of-duty/
Updated: 2026-11-29

**G.MACRO Call of Duty Edition** is a customizable Lua program for Logitech mice that support G HUB. Adjust horizontal and vertical compensation and the delay between movements. Two presets let you keep settings for different weapons or builds.

## G.MACRO Call of Duty Edition features
### Mouse and keyboard shortcuts
Hold the keyboard key first, then press the mouse button. The screenshot shows the default shortcuts.

<img src="/en/images/g-macro-cod-key-bindings.webp" width="978" height="820" alt="Default keyboard and mouse shortcuts for switching modes and adjusting compensation and delay in G.MACRO Call of Duty Edition." loading="lazy" decoding="async" />

### Assigning keyboard G keys
A compatible Logitech keyboard supports ten assignments: increase or decrease X, Y and delay, switch presets, toggle the clicker or X/Y jitter, and show settings. All `_G_BUTTON` variables default to `0`. For example, set `MODE_CHANGER_G_BUTTON = 1` to switch presets with G1 instead of right Shift + wheel click.

<aside class="note note--warning" aria-label="Important"><strong>Important</strong> G HUB Lua scripting supports only some Logitech keyboards with programmable G keys. Before buying a keyboard for this feature, ask Logitech Support to confirm that the specific model <strong>works with the Logitech Lua API</strong>.</aside>

### Turning the macro on and off
Turn on Caps Lock (`OFF_ON_MACROS_KEY = "capslock"`). In normal mode, hold RMB and press LMB. With `REQUIRE_RMB = true`, keep both buttons held. Set it to `false` to use LMB alone. When the clicker is enabled, hold left Alt and press LMB to start it. It keeps clicking until you release left Alt.

### Mode #1 and Mode #2
The script starts in Mode 1.

<img src="/en/images/g-macro-cod-modes.webp" width="975" height="273" alt="Default settings. Mode #1 uses X = 0, Y = 10 and a 25 ms delay. Mode #2 uses X = 0, Y = 5 and a 15 ms delay. The clicker is off in both modes." loading="lazy" decoding="async" />

X/Y jitter is off by default in both modes.

Switching modes reloads these five values from the script. To keep X, Y and delay values you tuned in game, display them in the console and copy them into the corresponding preset (`MODE_1_*` or `MODE_2_*`).

Both presets share the axis inversion settings. `INVERSION_X` and `INVERSION_Y` default to `1`; use `-1` to reverse either axis. `RANDOM_XY_VALUE` sets the amount of movement jitter (default `1`). `RANDOM_DELAY_MODE` independently varies the delay by up to 2 ms in either direction and defaults to off. Help is enabled (`HELP_MODE = true`). The console defaults to Russian; set `LANGUAGE = "EN"` for English.

[General G.MACRO guide](https://promacro.ru/en/universal-macros-logitech-g/#controls)

## Free Call of Duty macros
Trying out macros for the first time? Free macros for Call of Duty are collected on a separate page: **[download the free universal macros](https://promacro.ru/en/free-macros/#universal)**.
