How to Get a Logitech Macro (G HUB & Options)

VBA & macros · Updated November 23, 2026

To get a Logitech macro, you need to create it in Logitech G HUB (for G-series gaming gear) or Logitech Options+ (for MX and other productivity devices). The macro is then assigned to a key or button on your device. This guide covers both software paths, plus how to save, export, and troubleshoot macros.

What You’ll Need

  • A supported Logitech device (mouse, keyboard, or headset) with programmable buttons/keys.
  • Logitech G HUB (for G-series devices) or Logitech Options+ (for MX, M-series, K-series, etc.) installed. Download from the official Logitech website.
  • Administrator rights on your computer to install software.
  • Optional: a text editor to write a script for advanced macros (G HUB only).

Step-by-Step

Using Logitech G HUB (G-series devices)

  1. Open G HUB and ensure your device is detected (it appears on the home screen).
  2. Select your device by clicking its icon. Then click the Assignments tab (keyboard icon) or Commands tab (mouse icon) depending on your device.
  3. Click the button/key you want to program in the device diagram. A panel will open on the right.
  4. In the panel, click Macros (under the “Assignments” section). If you don’t see it, click the + sign next to “Macros” to create a new macro.
  5. Name your macro (e.g., “Combo Attack”).
  6. Record the macro: Click the Record button (red circle). Perform the keystrokes or mouse clicks you want to record. When done, click Stop.
  7. Edit the macro (optional): You can adjust timing between actions, add delays, or remove steps by right-clicking on a step and choosing “Delete” or “Insert Delay”.
  8. Assign the macro: After recording, the macro appears in the list. Click it to assign it to the selected key/button.
  9. Choose the macro behavior: In the assignment panel, you can set it to “Play Once”, “Play Toggle” (press to start, press to stop), or “Play Sequence” (repeat while held).
  10. Save: G HUB auto-saves, but you can also create a profile (click the profile dropdown and select “New Profile”) to keep your macro assignments per game or app.

Using Logitech Options+ (MX and productivity devices)

  1. Open Logitech Options+ and select your device from the list.
  2. Click the button you want to customize in the device image.
  3. In the dropdown that appears, choose Key Shortcut or Mouse Shortcut (depending on device). Then click “Create Shortcut”.
  4. A new window opens. Click “Record Shortcut” and press the keys or buttons you want to include. Click Stop when done.
  5. Click OK to save the shortcut. This acts as a macro (it can only do keystrokes, not mouse clicks).
  6. For more advanced macros (like delays or mouse clicks), Options+ does not support them natively. Use G HUB if you need that.

Creating a script macro (G HUB only)

  1. In G HUB, under the Macros section, click the + to create a new macro.
  2. Name it and click the Script tab (or choose “Script” as the type).
  3. Write your Lua script in the editor. Example:
    EnablePrimaryMouseButtonEvents(true)
    function OnEvent(event, arg)
      if IsKeyLockOn("capslock") then
        if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then
          MoveMouseRelative(0, 10)
        end
      end
    end
  4. Click OK to save, then assign the script macro to a key/button like you would a recorded macro.

Common Mistakes

  • Recording too much: If you include a mouse click that opens a menu, the macro will replay that click and break the sequence. Record only the exact actions you want.
  • Not setting the repeat option: A macro that plays once might not be what you need. Use “Play Toggle” for auto-clickers or “Play Sequence” for hold-to-repeat actions.
  • Assigning to the wrong key: Double-check the device diagram – you might be programming the left-click instead of a side button.
  • Using Options+ for mouse clicks: Options+ shortcuts only record keystrokes. If you need mouse clicks, use G HUB.
  • Forgetting to save a profile: If you switch games, your macro may disappear if you don’t have a profile assigned to that game.

Tips

  • Use delays wisely: In G HUB, add a 50-100ms delay between steps to make macros more reliable, especially in games.
  • Name macros clearly: Use names like “Heal Potion” or “Build Ramp” so you can find them later.
  • Backup your macros: In G HUB, click the gear icon (Settings) > “Backup” to save your profiles to your Logitech account or a file.
  • Test in a safe environment: Try the macro in a text editor or practice range before using it in a real match.
  • Use the “ON” toggle for scripts: If you write a Lua script, you can enable/disable it with a keybind (e.g., CapsLock) to avoid accidental triggers.

Troubleshooting

  • Macro not working at all: Check that the device is selected in G HUB/Options+ and that the macro is assigned to the correct key. Restart the software and re-plug the device.
  • Macro works in software but not in a game: Some games block macros or require “Administrator” mode. Run the game and G HUB as administrator. Also, disable “On-board memory mode” if you’re using it – that mode only stores basic macros, not scripts.
  • Macro repeats too fast: Add more delay between steps. In G HUB, right-click a step and choose “Insert Delay”, then set 100ms or more.
  • Script macro shows an error: Check your Lua syntax – missing “end” or parentheses are common. Copy a known working script from Logitech’s community forums.
  • Options+ doesn’t show my device: Make sure the device is supported and that you have the latest version of Options+ from the Logitech website.

Frequently Asked Questions

Can I use a Logitech macro on any computer?

Yes, if you install G HUB or Options+ on that computer. Macros are stored in the software or on the device’s onboard memory (if supported).

Do macros work on macOS?

Yes, both G HUB and Options+ have macOS versions. The steps are the same, but keyboard shortcuts may differ (e.g., Cmd instead of Ctrl).

Can I make a macro that types text?

Yes, record the keystrokes for the text or use a script with PressAndReleaseKey for each character. In Options+, the “Key Shortcut” can also type text if you record it.

Is using macros cheating in games?

It depends on the game. Some games allow macros for accessibility, others ban them. Check the game’s terms of service. Simple macros (like one-key combos) are often allowed, but automated actions may be considered cheating.

How do I delete a macro?

In G HUB, go to the Macros section, right-click the macro and choose “Delete”. In Options+, click the button with the shortcut, then click the trash icon.

Can I share my macros with others?

Yes, in G HUB you can export a profile (which includes macros) as a file and send it. In Options+, there is no direct export, but you can recreate the shortcut manually.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.