I recently bought a Razer Naga mouse, the one with all the buttons on the side. And I decided to create macros for often used actions. The most recent I wanted to make was a simple action that when I have multiple cells selected in a spreadsheet, I want them all copied to the line below. Here’s a quick tutorial for how I did it
Making a new hotkey shortcut for Windows
First install a tool called Autohotkey, which can be downloaded here:https://www.autohotkey.com/
It’s a pretty simple tool that allows you to make a script, which can be recalled by a predefined hotkey. The script I made listens to the hotkey CTRL-G and when that one is pressed it simply gives a COPY command, Arrow Down, followed by a PASTE command. So, whatever I have selected when the hotkey is pressed gets copied to the line below. The script is as follows:
^g:: ; Press ctrl-g to trigger the script
{
Send “^c” ; Copy (Ctrl+C)
Sleep 100 ; Wait for clipboard to update
Send “{Down}” ; Press Down arrow key
Send “^v” ; Paste (Ctrl+V)
}
Using the software you can compile the script to a .exe, place it in the windows start-up folder. You can open the start up folder by pressing windows-r and typing “shell:startup“.
Copy and paste the exe created by Autohotkey into that folder. Now every time you start your computer, the new hotkey will also automatically be available.
Adding a hotkey to the Razer Mouse button
Open up the Razer Central or Razer Synapse tool and select the button you’d like to add the shortcut to. In my case it’s button 12.
Select Keyboard Function in the left menu and set it to Alphanumeric and select the letter G. Select the “Include Modifier(s)” checkbox and make sure CTRL is highlighted. Klik on SAVE
that’s it! You’ve done it. You added a macro to your Razer Naga.
The awesome thing is now, that using the Autohotkey tool, you can make some very complicated macros for repeating actions in windows, games, apps, word, sheets, etc..