You can use Logitech Gaming Software (LGS) to create macros that automate a series of mouse button events and/or keystrokes with a single mouse button click or keypress of a G or function key.
- Getting started with a keyboard or gaming mouse in Automatic Game Detection mode
- Getting started with a gaming mouse in On-Board Memory mode
- Add mouse events to a macro
- Add keystrokes to a macro
- Add delays to a macro
- Select a Repeat Option for the macro
- Mouse events example
- Mouse events and keystrokes with delay example
Getting started with a keyboard or gaming mouse in Automatic Game Detection mode
- Make sure your gaming mouse or keyboard is connected using the supplied USB cable. If you have a wireless gaming mouse, make sure your device is charged and the USB receiver is securely connected to a USB port.
- Launch Logitech Gaming Software (LGS).
- Select your gaming device and navigate to the Home tab.
- If applicable, make sure the mouse or keyboard is set to Automatic Game Detection.
- Click on the Customize buttons, Customize G-keys or Customize Function Keys icon at the bottom of the screen.
- In the Profiles box, select a profile that you want to create macros for.
- Double-click or right-click on a button and select Assign New Command or Edit Command to open the Command Editor. You can also open the Command Editor by clicking on the “+” sign in the Commands panel. NOTE: Left and right mouse buttons can only be customized after their respective functions are assigned to other keys on the mouse.
- In the left pane of the Command Editor window, select the Multi Key tab.
- In the Name box, give your macro a unique name that will help you to identify it.
Getting started with a gaming mouse in On-Board Memory mode
- Make sure your gaming mouse is connected using the supplied USB cable. If you have a wireless gaming mouse, make sure your device is charged and the USB receiver is securely connected to a USB port.
- Launch Logitech Gaming Software (LGS).
- Select your gaming mouse and navigate to the Home tab.
- Make sure the mouse is set to On-Board Memory.
- Click on the Customize on-board profile icon at the bottom of the screen.
- Double-click or right-click on a button and select Assign New Command or Edit Command to open the Command Editor.
NOTE: Left and right mouse buttons can only be customized after their respective functions are assigned to other keys on the mouse. - Select the Multikey Macro tab from the left-hand pane of the Command Editor window.
- Right-click anywhere in the Keystrokes section of the Command Editor and hover over Insert mouse Event. The following options are displayed:
- Left Button
- Middle Button
- Right Button
- Wheel
- Extra Button
- For each mouse button, you can insert Down, Up, or Click events. If you choose the Click event, LGS automatically adds sequential Down and Up events.
NOTE: Although you can add separate button up and down events, it is recommended to add them both one after the other. Otherwise, the macro will execute as if the button is held down. - To delete events, right-click on the respective event in the Keystrokes section and select Delete. You can select multiple events by dragging the mouse while holding the left click button.
- Once your macro is complete, click OK. Keyboard macros must contain at least one key press. The OK button remains grayed out until your macro meets this requirement.
NOTE: If you opened the Command Editor from the Commands pane on a keyboard or mouse in Automatic Game Detection mode, you'll need to drag the macro from the Commands list onto a mouse button or keyboard key in the Customize buttons window. The macro’s name will be visible above the mouse button or keyboard key.
See also Mouse events example.
- In the Multi Key or Multikey Macro tabs in the Command Editor, click Start Recording to begin entering keystrokes.
NOTE: Select Record delays between events to automatically add delays between the keystrokes you input. For example, if you press the A key and wait 4 seconds before pressing the B key, LGS automatically includes those delays in the macro. This feature is not available on a mouse in On-Board Memory mode. - Press the keys or type on the keyboard as you would in-game.
NOTE: LGS only registers the keys that are pressed, not the symbols that result from the keystrokes. If you want to insert the “!” symbol in your macro, LGS displays shift down, up and button 1 up and down events.
TIP: Read the other sections of this article to understand how to manually add delays and mouse events to the macros you create with LGS. - Once you are finished adding the desired keystrokes, click Stop Recording.
- You can add keystrokes to a macro even after you stop recording. Right-click any event in the Keystrokes section and select Record Before Here or Record After Here. Depending on which option you choose, the new keystrokes will be added either before or after the event you selected. Once you are finished adding the additional keystrokes, click Stop Recording.
- Click OK to save the macro. Keyboard macros must contain at least one key press. The OK button remains grayed out until your macro meets this requirement.
NOTE: If you opened the Command Editor from the Commands pane on a keyboard or mouse in Automatic Game Detection mode, you'll need to drag the macro from the Commands list onto a mouse button or keyboard key in the Customize buttons window. The macro’s name will be visible above the mouse button or keyboard key.
Add delays to a macro
Inserting delays within macro events allows you to accommodate for latency and the time required to complete in-game actions. For example, if a certain in-game action requires 2 seconds to complete, you have to add a delay so the macro waits 2 seconds before executing the rest of the sequence. You can automatically add delays between your keystrokes by selecting the Record delays between events checkbox below the Keystrokes section. However, you have to manually add delays between mouse events. The same steps apply to manually adding delays between keystrokes:
- Right-click the event in the Keystrokes section of the Command Editor before which you want to add a delay.
- Select Insert Delay from the pop-up menu.
- LGS inserts a 0.5-second delay by default. To customize the length of the delay, double-click on the entry in the Keystrokes section or right-click the delay event and select Edit.
- Type a value in milliseconds and then press Enter to save.
See also Mouse events and keystrokes with delay example.
Select a Repeat Option for the macro
You can use the Command Editor to select a repeat option for your macro. By default, LGS sets the Repeat Options to None. You can choose from three repeat options: None, While Pressed, and Toggle.
NOTE: Repeat option functionality is unavailable while the mouse is in On-Board Memory mode.
- Open the Command Editor window for the macro you want to repeat.
- In the Repeat Options box, click the down arrow on the right.
- Select one of the following options from the drop-down menu:
- None: The macro only executes the keystrokes once.
- While Pressed: Select this option to repeat the macro while the assigned button is pressed down.
- Toggle: Clicking the button activates the macro and it repeats until the button is clicked again.
- Click OK to save your changes.
Mouse events example
In this example, we will create a double-click macro to better understand how mouse events work.
- Follow the Getting Started steps above.
- Right-click in the Keystrokes section, hover over the Insert Mouse Event text, then hover over the Left Button option in the pop-up menu and select Click from the second pop-up menu.
- Repeat Step 2 to insert a second Left Button click event.
- Click OK to save the macro.
Mouse events and keystrokes with delay example
In this example, we will set up a macro to open the Device Manager to get acquainted with keystrokes and delays.
- Follow the steps in the Getting Started section above.
- Click Start Recording, press and hold the Windows key, press the E key, and release the Windows key. You should see the following commands in the Keystrokes section: NOTE: You might see Right Windows instead of Left Windows depending on the Windows key you used.
- Right-click the Keystrokes section, hover over Insert Mouse Event, and then over Right Button. Select Click from the pop-up menu.
- We need to add a delay between the keystrokes and the right button click events so there is enough time to position the pointer on the Computer button in the Navigation pane. Right-click the Right Button Down event and select Insert Delay. Next, double-click the delay event, type 4000 (4s) and press Enter.
- Repeat Step 3 but insert a Left Button click event instead.
- Add a delay between the Right Button Up and Left Button Down events so there is enough time to position the cursor over the Manage option in the pop-up menu. Right-click the Left Button Down event and select Insert Delay. Next, double-click the delay event, type 4000 (4s) and press Enter.
- Click OK to save your macro.
Frequently Asked Questions
There are no products available for this section