PowerToys Keyboard Manager
Maps one key or shortcut to another, to a text sequence, to a program or to a web address. It does not record clicks.
A macro for mouse clicks and keystrokes is a saved sequence of key presses, typed text and pointer clicks that Windows replays from one trigger. This guide covers Windows 10 and 11 and shows which free tool records which half of the job.
The short version: no single free tool handles every step type well, so match the tool to the step.
See our top recommendationQuick answer
Open Power Automate for desktop, select Record, perform the clicks and keystrokes once, then save the flow and run it. Typed text and app launches are faster in a hotkey or text-macro tool. Add a short wait after every click that opens a window.
To create a macro for mouse clicks and keystrokes on Windows, record the steps once in Power Automate for desktop, or script them in AutoHotkey, then assign a trigger and test with short waits. Typed text and app launches need no recorder at all.
Windows has no built-in macro recorder on the desktop. What it has is a set of free tools that each cover part of the job, which is why the sections below sort them by the step types they handle. Power Automate for desktop records mouse and keyboard activity and turns it into editable actions. AutoHotkey lets you write the same sequence as a short script. PowerToys Keyboard Manager remaps keys and shortcuts, and can insert text, start a program or open a web address from one shortcut.
This guide is for people who repeat the same clicks and typing on a Windows PC and want to stop. It assumes no scripting background. If you only retype the same text, jump to the typed-shortcut tutorial. If a macro already runs but misses, go straight to the fixes.
Choose what you need help with. The links jump to the section that owns the answer.
What do you repeat most often? Select one to see the matching route.
Use a recorder. Power Automate for desktop records clicks against the controls you touch. Read recording your first macro and keep the display scale unchanged between recording and running.
Use a text-macro tool or hotstrings. A short typed trigger that expands into a block of text is the quickest win, and it needs no click positions at all. See the typed-shortcut tutorial.
Use a launcher shortcut. PowerToys Keyboard Manager can map one shortcut to a program or web address, and AutoHotkey’s Run command does the same in one line. See assigning macros to keys.
Record the clicks, script the timing. Record in Power Automate for desktop, or write the Click, Send and Sleep lines yourself in AutoHotkey. The four-step process covers both.
Windows macros fall into four types: typed text, key sequences, mouse clicks and program launches. Each needs a different tool feature, and only recorders and scripts reproduce mouse clicks, which is why the mix matters before you pick software.
| Type | What it sends | Example | Tools that do it | Needs click positions |
|---|---|---|---|---|
| Typed text | Characters you would otherwise type | A signature, an address, a case reference | Any text-macro tool, AutoHotkey, PowerToys | No |
| Key sequence | Shortcuts and special keys in order | Ctrl+S, Tab, Tab, Enter | AutoHotkey, PowerToys, recorders | No |
| Mouse clicks | Clicks at a position or on a control | Open a menu, tick a box | Recorders and AutoHotkey | Yes |
| Program launch | Starts an app, folder or web address | Open the morning reports | PowerToys, AutoHotkey, hotkey launchers | No |
Windows Home can author and run Power Automate for desktop flows on the local PC, but cannot trigger them from the cloud. A macro tool running with normal rights cannot send input to an app that runs as administrator, so run both at the same level if one macro must reach the other.
Four free routes cover almost every case: remapping shortcuts with PowerToys, recording with Power Automate for desktop, scripting with AutoHotkey, and a dedicated text and key macro tool. Only the recorder and the script reproduce mouse clicks.
Maps one key or shortcut to another, to a text sequence, to a program or to a web address. It does not record clicks.
Records mouse and keyboard activity into editable actions. The only free route here that captures clicks without code.
Write Send, Click and Sleep lines in a short script file. Exact control, with a learning curve.
Replace a short typed trigger with a block of text or keystrokes. Fast for typing, silent on clicks.
Microsoft’s Keyboard Manager, part of the free PowerToys suite, swaps one key or shortcut for another and can send a fixed text sequence. Recent versions also map a shortcut to a program path or a web address, and a mapping can be limited to one app. Because it only understands keys, it never learns where to click. Keep PowerToys running at startup or the mappings stop applying after a restart.
Power Automate for desktop ships with Windows 11 and installs on Windows 10 from Microsoft’s site or the Store. Its recorder watches mouse and keyboard activity and ties each action to the window control you touched, then lists the result as editable steps. You sign in with a Microsoft account to use it. The Windows Home edition can author and run flows locally.
AutoHotkey version 2 sends keystrokes with Send, clicks with Click and pauses with Sleep. SendInput is the default send mode and is generally the most reliable. Click positions are read relative to the active window unless you change CoordMode, which is the setting to check first when clicks drift. The AutoHotkey documentation warns that not every game accepts sent keys and clicks.
This category stores a short trigger and the text or keystrokes it should type, and some add multiple clipboards and a hotkey launcher. It is the least effort for repeated typing. It will not click a button for you unless the tool says it records clicks, so read the feature list before you count on that.
Plan the steps, record or write them, assign one trigger, then test and add waits. A simple macro takes about fifteen minutes, and the test step is where most macros get fixed.
List each step as Send, Click or Wait. Keep a macro under about fifteen steps, because Microsoft’s own macro guidance for Excel recommends several short macros over one long one. Note the window size and display scale you use.
In Power Automate for desktop, press Record and act at a calm pace. Microsoft’s training module advises going slowly and waiting several seconds between actions. In AutoHotkey or a text-macro tool, type the steps instead.
Pick a key combination no installed program already uses, such as Ctrl+Alt plus a number, or a typed prefix like a slash before a short code. Avoid single letters.
Run it three times on dummy data. Wherever a window or page needs time to load, add a Wait step. Check the result with the steps in the verification section.
Power Automate for desktop records clicks and keystrokes against the controls you touch, so a recording survives small window shifts better than raw screen coordinates do. Install it, press Record, do the task once at a calm pace, then save.
Microsoft lists two recorder gaps: steps from the Windows Start menu or system tray may not be captured, and keystrokes sent to a maximized Remote Desktop window through an image-based recording are not recorded. Open the app with a launch action instead of recording the Start menu.
A macro trigger should be a key combination that no installed program already uses, such as Ctrl+Alt plus a letter, or a prefix you type before a short code. Single letters and shared shortcuts such as Ctrl+C will collide with the app you are in.
There are three common ways to bind a trigger. In PowerToys Keyboard Manager you choose the shortcut, pick an action such as Run program, Open URL or send Text, and optionally name the app it applies to. In AutoHotkey the hotkey is the text before the double colon: ^!d:: means Ctrl+Alt+D. In a text-macro tool you type a short prefix and code, and the tool swaps in the stored text.
Tick each item as you confirm it.
0 of 5 completed
The scripts below use AutoHotkey version 2 syntax. Save each as a plain text file ending in .ahk, then double-click it. Change the positions and names to fit your own window.
#Requires AutoHotkey v2.0
::/sig::Kind regards,{Enter}The Accounts Team#Requires AutoHotkey v2.0
^!d::Send FormatTime(, "yyyy-MM-dd")#Requires AutoHotkey v2.0
CoordMode "Mouse", "Window" ; positions measured from the window’s top-left corner
^!1:: {
Click 220, 140 ; focus the search box
Sleep 300 ; give the box time to take focus
Send "invoice 2041{Enter}"
Sleep 800 ; wait for results to load
Click "640 380 2" ; double-click the first result
}#Requires AutoHotkey v2.0
^!r::Run "explorer.exe C:\Reports"Hotstrings fire when you type the trigger and then a space, a period, Enter or one of the other default ending characters. {Enter} inside the replacement sends a real Enter key press by default, so check the line before you run it on a form.
Most misfires come from timing, window position or rights levels, not from the recording itself. Start with the table, work down the checklist, and re-test after each single change so you know which one fixed it.
| Problem | Likely cause | Fix |
|---|---|---|
| Clicks land in the wrong place | The window moved, the display scale changed or the app opened on another monitor | Measure clicks from the window with CoordMode, or record against controls. Full walkthrough: fix a macro that clicks in the wrong place. |
| Keys appear in the wrong field | Focus had not arrived when the macro typed | Click the field first, then add a short wait before sending text. |
| Nothing happens in one app | That app runs as administrator and the macro tool does not | Start the macro tool at the same rights level, or run the app normally. |
| The trigger opens the wrong thing | Another program already uses that key combination | Change the combination and use the conflict checker above. |
| The macro works at home, fails at work | Different display scale, monitor layout or app version | Re-record or re-measure on the work PC, and check the IT policy first. |
| The recorder skipped a menu step | Start menu and system tray steps may not be captured | Replace that step with a launch action for the app. |
| A game ignores the macro | Not every game accepts sent keys and clicks | Read the game’s rules on automation before trying another mode. |
Work down the list before you re-record.
0 of 5 completed
The usual errors are recording too fast, trusting screen coordinates, skipping waits and testing on live data. Each one is cheap to avoid if you know it exists before you start.
Recording at full speed. A recording made without pauses replays faster than the app can respond. Slow down while you record and add waits afterwards.
Trusting a bare screen position. A coordinate that is right today is wrong after a window move or a display scale change. Measure from the window or use a control-based recorder.
Typing passwords into a macro. A stored password sits in plain view of anyone who opens the macro list. Let a password manager fill credentials instead.
Testing on live records. A misfire can delete, send or overwrite real data. Always rehearse on a copy.
A macro has worked when it produces the same result three times in a row on test data, in every app where you plan to use it, and after a restart. Check the output, not just the absence of errors.
Only Power Automate for desktop and AutoHotkey reproduce mouse clicks. Text-macro tools and PowerToys cover typing, shortcuts and launches with far less setup, so most people end up using one of each rather than a single tool for everything.
| Method | Mouse clicks | Key sequences | Launch apps | Cost | Best for |
|---|---|---|---|---|---|
| PowerToys Keyboard Manager | No | Yes | Yes (program or web address) | Free | Remapping and one-key launches |
| Power Automate for desktop | Yes | Yes | Yes | Free tier with a Microsoft sign-in | Recording multi-screen tasks |
| AutoHotkey v2 | Yes (scripted) | Yes | Yes | Free, open source | Exact control and hotstrings |
| Text-macro tool (such as Macro Keys) | Not listed | Yes, via a virtual keyboard | Hotkey launcher | Free download | Repeated typing and clipboards |
Count how many of your steps need a click. If none do, skip the recorder: a text-macro tool or PowerToys is quicker to set up and easier to keep working. If most do, record once, then script the waits. If you run into an app that blocks sent input, no tool on this page will fix that, and a policy check comes first.
Setup effort rises left to right in the table above: a text macro takes about two minutes, a recorded flow about fifteen, and a script about an evening the first time you write one.
A macro pays off when you repeat a task at least a few times a week, the steps never change and a mistake costs little. Data entry, canned replies and start-of-day routines fit. One-off jobs and screens that change daily do not.
Open the same intake form each morning, type the same headings, tab through the same fields. A recorded flow plus a typed shortcut covers it.
Support replies, meeting links and addresses are typed hundreds of times a year. A short typed trigger removes that work.
Open the same four apps, one folder and two web addresses with one shortcut instead of a dozen clicks.
Extra keys on a second keyboard can hold the macros you use most, one key per task.
Enter how often you repeat the task and how long it takes by hand and with a macro. The result shows the minutes you would save in a week.
Defaults are placeholders. Replace them with your own numbers.
If your repeated work is typing, shortcuts and launching apps rather than clicking, we recommend Macro Keys from NewSoftwares.net. It is a free Windows download that stores text and keystroke macros, keeps several clipboards and launches programs from a hotkey.
Macro Keys is made by NewSoftwares.net, the publisher of this guide, so weigh this section with that in mind. Its feature list covers text macros, multiple clipboards, a hotkey launcher and macro encryption. It does not list mouse click recording, so for clicks use the recorder or script routes above.

To build a typed shortcut, choose a trigger, enter the text to send, add any special keys with the virtual keyboard, then save and test it in a plain text window. The whole job takes about two minutes and needs no recording.
The Hotkey Launcher tab does the app-launching half of the job, and Multiple Clipboards keeps recent copies so you can paste an earlier one.



Windows also keeps a clipboard history of up to 25 items. Turn it on with Windows key plus V if you only need to paste recent copies.
Export your macros to a file after every meaningful change and keep that file somewhere other than the PC that runs them. A macro library you cannot restore is a library you will rebuild by hand after the next reinstall.
Macro Keys has Import Macros from File and Export Macros to File buttons in its macro window, so a backup is one click and a restore is one click. AutoHotkey scripts and PowerToys settings are plain files you can copy the same way. Power Automate for desktop flows are saved to your account and can be exported or copied from the flow list.
Remove names, addresses, account codes and any password from a macro before you pass the file to a colleague. A shared macro runs with the permissions of whoever opens it.
Before you automate on a work PC, check policy with IT, keep sensitive data out of the macro and log what each macro does. Most problems at work come from unapproved input automation, not from the macro itself.
Does my employer allow macros?
Many do for ordinary typing and shortcuts, but policies differ. Ask IT before you run any input automation on a managed PC.
What stays out of a macro?
Passwords, customer data, card numbers and anything covered by a compliance rule.
Who is responsible for a mistake?
You are. A macro repeats an error as quickly as it repeats a correct step.
Where do I get help?
The page on macros at work and IT policy covers questions to ask and a simple risk scorecard.
Read the full checklist on macros at work and IT policy.
These are the questions readers ask most about macros for mouse clicks and keystrokes on Windows. Filter by topic, or open any question to read the short answer.
Not on the desktop. Windows has no built-in macro recorder, but Power Automate for desktop is a free Microsoft app that records clicks and keystrokes. On Windows 11 it is preinstalled, and on Windows 10 you install it first.
It is safe only if your employer allows it. Ask IT first, keep passwords and customer data out of the macro, and run it on test data before real work.
The window moved, the display scale changed or the app opened on another monitor. Measure clicks from the window instead of the screen, and keep scale and layout the same as when you built it.
A hotkey is the trigger, and a macro is the sequence the trigger plays. One hotkey can start a macro of many steps. The full comparison is on its own page.
The second app may run as administrator while the macro tool does not, or it may block sent input. Run both at the same rights level, and check whether the app forbids automation.
It can, but you should not store one in a macro. Anyone who opens the macro list can read it. Use a password manager to fill credentials.
Keep each macro to about fifteen steps. Several short macros are easier to test and repair than one long one.
No. A recorder and a text-macro tool need no code. AutoHotkey needs a few lines of script, and the sample macros in this guide can be copied as they are.
Yes, with extra software that treats the second keyboard separately. The page on using a second keyboard as a macro pad explains the options and limits.
About this guide. Written by the NewSoftwares.net editorial team and checked against Microsoft and AutoHotkey documentation in November 2026. NewSoftwares.net publishes Macro Keys, which this guide recommends for typed shortcuts only.
Start with one task you repeat every day, build a typed shortcut for it and measure the minutes saved by Friday.