This guide shows you how to create a macro on a Logitech mouse or keyboard using Logitech G Hub (the current software) or the older Logitech Gaming Software (LGS). Macros let you record a sequence of keystrokes, mouse clicks, or button presses and replay them with a single key press. This is useful for repetitive tasks in games (e.g., combo moves, building in Fortnite) or productivity (e.g., inserting a signature, running a series of shortcuts). You’ll need a compatible Logitech device (G series, or any device that supports G Hub/LGS), the software installed, and a computer running Windows or macOS.
What You’ll Need
- A Logitech G-series mouse, keyboard, or other compatible device.
- Logitech G Hub (recommended) or Logitech Gaming Software (for older devices) installed. Download from the official Logitech website.
- Administrator rights to install software (if on a work/school computer).
Step-by-Step
- Open Logitech G Hub. If you don’t have it, download and install it from logitech.com. Launch it after installation.
- Select your device. At the top of the G Hub window, you’ll see a list of your Logitech devices. Click on the mouse or keyboard you want to assign the macro to.
- Go to the Assignments screen. On the left sidebar, click “Assignments” (for mice) or “Keys” (for keyboards). This shows a diagram of your device with clickable buttons/keys.
- Choose the button/key to assign. Click on the button or key you want to trigger the macro. For example, on a mouse, click the side button you rarely use; on a keyboard, pick an F-key or a G-key if you have one.
- Create a new macro. In the pop-up window that appears, look for the “Macros” section. Click the “+” icon or “New Macro” button. Give your macro a name (e.g., “Speed Build”) and press Enter to confirm.
- Start recording. With your new macro selected in the list, click the “Record” button (a red circle) at the bottom of the macro editor. A recording bar will appear. Perform the keystrokes and mouse clicks you want to record. For example, press W, then Shift, then click the left mouse button. You can also add delays between actions by using the “Add Delay” button after recording.
- Stop recording. Click the “Stop” button (a black square) when you’ve finished the sequence. Your recorded actions will appear as a list in the editor.
- Adjust the playback options. In the macro editor, you’ll see a “Playback Options” dropdown. Choose how the macro runs: “Play once” for a single sequence, “Play multiple times” (set a number), “Toggle” (press once to start, press again to stop), or “Hold” (repeat while the key is held). For most macros, “Play once” works best. If you want a repeating action, select “Play multiple times” and set the count, or use “Toggle” for an infinite loop.
- Assign the macro to the button. After configuring, close the macro editor. Back in the Assignments screen, your macro should appear in the “Macros” list. Drag it onto the button/key you selected in step 4. Alternatively, click the button and choose your macro from the list.
- Test it. Press the assigned button/key. The macro should execute. If it doesn’t, check that the macro is assigned and that G Hub is running (it must be running in the background for macros to work).
- Save your profile. G Hub automatically saves changes, but you can also create a custom profile by clicking the “Profiles” section and clicking the “+” to add a new profile. This allows you to have different macros for different games or apps.
Common Mistakes
- Not having G Hub running: Macros only work when Logitech G Hub (or LGS) is open in the system tray. If you close it, the macro stops working.
- Recording too much: If you include a mouse click that opens a menu or switches windows, the macro will do that every time. Record only the exact actions you want.
- Forgetting to set playback options: If you leave it on “Play once” and you wanted a repeating action, the macro will only run once. Always check the playback options.
- Assigning to the wrong button: Double-check that you dragged the macro onto the correct button on the device diagram.
- Using LGS with a newer device: Some newer Logitech devices only work with G Hub, not LGS. Check compatibility.
Tips
- Add delays manually: If your macro needs pauses (e.g., waiting for a cooldown), use the “Add Delay” feature. After recording, click the delay icon between actions to insert a specific time in milliseconds.
- Use G-Shift (if available): On mice with G-Shift, you can double the number of assignable buttons. Set up G-Shift as a modifier, then assign macros to buttons that only work when G-Shift is held.
- Create profiles per game: In G Hub, click “Profiles” and create a profile for a specific game. Then, in the game’s settings, assign the profile so it auto-switches when you launch the game.
- Test in a safe environment: Before using a macro in an online game, test it in a practice mode or a text editor to ensure it does what you expect.
- Keep macros simple: Long macros with many actions are harder to troubleshoot. Break complex tasks into smaller macros and assign them to different keys.
Troubleshooting
- Macro doesn’t work at all: Ensure Logitech G Hub is running (check the system tray). Also, confirm that the macro is assigned to the correct button and that the device is recognized in G Hub (try unplugging and replugging the device).
- Macro works in one app but not another: Some games or applications block simulated input. Check if the game has anti-cheat software that might prevent macros. Also, try running the game as administrator, or run G Hub as administrator (right-click G Hub icon > Run as administrator).
- Macro repeats too fast or too slow: Adjust the playback options. If it’s too fast, add delays between actions. If it’s too slow, reduce or remove delays.
- Macro records but doesn’t replay exactly: Some actions, like mouse clicks, depend on cursor position. If your macro includes a click, it will click wherever the cursor is at that moment. Use keyboard shortcuts instead if possible.
- G Hub won’t open or crashes: Uninstall and reinstall G Hub. Make sure your device firmware is up to date (in G Hub, click the gear icon > Settings > Check for updates).
Frequently Asked Questions
- Can I use macros in any game? It depends on the game’s rules. Many games allow macros for accessibility, but some online games consider them cheating. Check the game’s terms of service. Use at your own risk.
- Can I record a macro that includes mouse movement? No, Logitech G Hub does not record mouse movement (only clicks and scroll). For mouse movement, you would need a separate scripting tool, but that’s beyond G Hub’s scope.
- How do I delete a macro? In G Hub, go to the Assignments screen, click on the macro in the list, and click the trash icon. Or right-click the macro and select Delete.
- Can I export macros to another computer? Yes. In G Hub, go to Settings (gear icon) > “Backup & Restore” and create a backup file. You can then restore it on another computer with G Hub installed.
- What’s the difference between G Hub and Logitech Gaming Software? G Hub is the newer software, used for most current devices. LGS is the older software, still supported for legacy devices. If your device is from before 2018, it might only work with LGS.
- Can I use macros on a non-G Logitech device? Only devices that are supported by G Hub or LGS have macro capabilities. Standard office mice like the M185 do not support macros.
Related
- Shortcut for Forward in Excel? Quick Answer
- Generate Random String Online: How It Works
- Python dict update() Method Explained
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- Excel VBA Array: How to Add an ItemTo add an item to a one-dimensional dynamic VBA array, increase its upper bound with ReDim Preserve, then…
- VBA Open UserForm on Button Click: Code and Setup GuideTo open an Excel VBA UserForm when a worksheet button is clicked, create a public macro in a…
- Excel VBA: Find a Row with Specific Text in a ColumnTo find a row containing specific text in Excel VBA, use the range’s Find method, then read the…
- Excel VBA Date and Time Stamp: Add Fixed TimestampsTo add a fixed date-and-time stamp with Excel VBA, assign Now to a cell and apply a date-time…
- Excel VBA: How to Turn Off Error HandlingTo turn off an error handler in the current Excel VBA procedure, use On Error GoTo 0. It…
- Excel VBA Dictionary Keys: Add, Find, and Manage ItemsIn Excel VBA, a dictionary key is a unique identifier used to store and retrieve a corresponding value.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.