Windows keyboard guide

How to Swap Two Keys on a Keyboard in Windows: Step-by-Step Guide 2026

Swapping two keys on a Windows keyboard takes about five minutes with the right free tool. This guide covers PowerToys, the registry and AutoHotkey, then shows how text macros and hotkeys fit alongside a swap.

NewSoftwares.net editorial teamPublished November 2026Last verified: November 202622 min read

Dark settings panel showing a two-row key swap map beside three free swap methods and a checklist

How to Swap Two Keys on a Keyboard in Windows: Quick Answer

Quick answer

To swap two keys on a keyboard in Windows 11 or Windows 10 (version 2004 or later), install Microsoft PowerToys, open Keyboard Manager, select Remap a key, and add two rows: A sends B, and B sends A. Select OK and the swap works immediately. If the swap must load without a running app, write a Scancode Map value in the registry and restart. Both methods are free. Microsoft’s own remapping guide points to PowerToys for this job.

At a glance
Applies toWindows 11 and Windows 10 version 2004 or later, x64 or Arm64
Time neededAbout 5 minutes with PowerToys, about 10 with the registry and a restart
DifficultyEasy with PowerToys, moderate with the registry
CostFree for PowerToys, AutoHotkey and the registry method
Needs admin or internetAdmin for the registry method and for elevated windows; internet only to download a tool
Last verifiedNovember 2026

Pick your path

Choose what you need help with and jump to the section that owns it.

Select a path above. Each one points to a single section, not a copy of it.

What you need before you swap two keys on a Windows keyboard

Before you swap two keys on a Windows keyboard, confirm three things: your Windows version, whether you can install an app or write to the registry, and exactly which two keys you mean, including left or right for Ctrl, Alt, Shift and Win.

  1. Windows version. Press Win+R, type winver and press Enter. PowerToys needs Windows 11, or Windows 10 version 2004 (build 19041) or newer, on an x64 or Arm64 processor.
  2. Install and admin rights. PowerToys offers a per-user install that lands in %userprofile%\AppData\Local\Programs, and a machine-wide install in Program Files. The registry method always needs administrator rights.
  3. Your two keys. Write them down with their position, for example “Left Ctrl and Caps Lock”. A swap that names only “Ctrl” is ambiguous because most keyboards have two.

Swap two keys on a keyboard in Windows: what counts as a swap

A swap is two mappings that point at each other. Press the first key and Windows receives the second key’s code; press the second and it receives the first. Nothing changes in the keyboard hardware. The mapping lives in software, so deleting it restores the original layout.

Myth

Swapping keys damages or reprograms the keyboard.

Fact

Every method here is a software mapping. Delete the mapping and the physical keyboard behaves as before.

Myth

One row is enough to swap two keys.

Fact

One row only redirects one key. A second row is needed so the other key returns the favour; without it you lose a key.

The two-row rule

Every swap needs two mappings (A sends B, B sends A) plus one written undo step stored beside them. If any of the three is missing, the swap is unfinished.

Compatibility note

PowerToys is Windows 11 and Windows 10 2004 or later only. The registry value and AutoHotkey reach older Windows versions, but this guide covers current releases.

Swap methods

Best Free Methods to Swap Two Keys on a Keyboard in Windows

Four free routes exist. Each one stores the two rows in a different place, and that place decides what survives a restart, an admin window or the sign-in screen.

Isometric keycaps with a swap arrowASD↔
01/ PowerToys Keyboard Manager

Microsoft’s free utility adds a Keyboard Manager tab where Remap a key takes two rows and applies them when you select OK, with no restart. Mappings work only while PowerToys runs, so switch on Run at startup in General. Keyboard Manager does not load on the sign-in screen, and an app running as administrator ignores it unless PowerToys also runs as administrator.

02/ Scancode Map in the registry

Windows reads a binary value named Scancode Map under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout. Because the value belongs to the whole machine and not to a running program, it can apply before sign-in; test that on your own PC. Changes need a restart or a sign-out. SharpKeys, a free open-source tool, writes the value through a window instead of by hand.

03/ AutoHotkey script

Two lines in AutoHotkey v2, a::b and b::a, swap the pair while the script runs. AutoHotkey’s own documentation calls this approach less pure than registry remapping, and some games ignore it. A script needs a shortcut in the Startup folder to return after a restart.

04/ A custom keyboard layout file

Microsoft Keyboard Layout Creator 1.4 builds an installable layout in which two keys exchange characters. It changes what a key types, not which physical key is pressed, and its window will not edit Backspace, Tab, Caps Lock, Return, Shift, Ctrl or Alt. It suits language and character work more than a plain swap.

Need the full side-by-side with timing, scope and setup effort? The detailed comparison of PowerToys, Scancode Map and AutoHotkey for key swaps sits on its own page, so this guide keeps the short version.

Read the full PowerToys vs Scancode Map vs AutoHotkey comparison

Methods compared
MethodDifficultyReachCostBest forLimitations
PowerToys Keyboard ManagerEasyYour user session while PowerToys runsFreeMost home and office PCsNo sign-in screen; Fn key mostly out; elevated windows need an elevated PowerToys
Scancode Map (registry)ModerateWhole machine, every keyboardFreeShared PCs, kiosks, pre-sign-in swapsAdmin rights and a restart; two-byte codes only; no per-user setting
AutoHotkey v2 scriptModerateYour user session while the script runsFreeApp-specific rules and conditionsElevated windows need UI access; some games ignore it
Keyboard layout fileHardInstalled language layoutsFreeCharacter changes, not modifier keysCannot edit Ctrl, Alt, Shift, Caps Lock or Tab in the window
Macro Keys (text macros)EasyTyped text and launches while it runsFreeReplacing repeated typingDoes not swap keys; the official page documents no key remapping
VerdictFor most readers PowerToys is the swap tool. Pick the registry method when the PC is shared or the swap must exist before sign-in.
Free

PowerToys, AutoHotkey and the registry method cost nothing to use.

Two rows make one swap: A sends S and S sends A.

Sources checked for this guide in November 2026

Microsoft LearnPowerToys docsAutoHotkey docsSharpKeys projectMicrosoft Download CenterNewSoftwares.net

Works on Windows 10 and 11

Step-by-Step: Swap Two Keys on a Keyboard in Windows

To swap two keys with PowerToys, open Settings, choose Keyboard Manager, select Remap a key, add a row for each direction, and select OK. Microsoft’s documentation uses A and B as the example: A to B, then B to A in a second row.

  1. Install PowerToys

    Download the installer from the PowerToys releases page, or install it from the Microsoft Store, or run the winget command below. The installer also adds the Microsoft Edge WebView2 Runtime if it is missing.

  2. Open Keyboard Manager

    Open PowerToys Settings, select the Keyboard Manager tab, and turn on Enable Keyboard Manager.

  3. Add the first row

    Select Remap a key, then Add key remapping. In the Select column, choose the first key (press Select and tap the key, or use the drop-down). In To send, choose the second key.

  4. Add the second row

    Add another remapping with the keys reversed: the second key in Select, the first key in To send.

  5. Select OK

    Changes take effect immediately. If Windows shows an orphaned-key warning, you have probably added only one row.

  6. Keep it after a restart

    Open General in PowerToys Settings and turn on Run at startup. Remapping works only while PowerToys is running in the background.

Install with the Windows Package Manager (PowerShell)
winget install Microsoft.PowerToys --source winget

Write the registry swap yourself

This writer builds a Scancode Map value for any two keys on the list, using the same binary layout SharpKeys writes. Pick two keys, copy the text into a file ending in .reg, and open it with administrator approval. Restart Windows afterwards.

Registry swap writer

Default pair: Caps Lock and Left Ctrl.

swap-keys.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00
undo-swap.reg (removes every Scancode Map entry)
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=-
Check before you import

Importing this file replaces any Scancode Map value already on the PC, including one written by an IT department or a tool such as SharpKeys. Open the Keyboard Layout key in regedit first and note whether the value exists. Keys with three-byte scancodes cannot be remapped this way.

Swap with an AutoHotkey v2 script

Install AutoHotkey v2, save the lines below in a file ending in .ahk, and double-click it. Each line handles one direction, and the second line is what makes it a true swap. To run it after a restart, press Win+R, enter shell:startup, and paste a shortcut to the file into the folder that opens.

swap-two-keys.ahk (AutoHotkey v2)
a::b
b::a

How to Verify It Worked After You Swap Two Keys on a Keyboard in Windows

Verify a key swap with four tests: type both keys in Notepad, repeat the test inside an app run as administrator, restart Windows and test again, and, for the registry method, test at the sign-in screen. A swap that passes all four is finished.

  1. Open Notepad and press each swapped key once. The first key should print the second key’s character, and the reverse.
  2. Hold Shift and press both keys, then toggle Caps Lock. Mapped keys should follow the same rules as unmapped ones.
  3. Right-click an app, choose Run as administrator, and type again. PowerToys documents that remapping does not reach an elevated window unless PowerToys itself runs as administrator.
  4. Restart Windows and sign in. If the swap vanished, PowerToys is not set to run at startup, or the AutoHotkey shortcut is missing from the Startup folder.
  5. Registry method only: at the sign-in screen, type a few characters into the password box with the swapped keys, then confirm the password still goes in as you expect.
Where each method should pass
TestPowerToysScancode MapAutoHotkey
Notepad, same sessionPass at oncePass after restart or sign-outPass while the script runs
App run as administratorPass only if PowerToys is elevatedPassPass only with UI access or an elevated script
After a restartPass if Run at startup is onPassPass if the Startup shortcut exists
Sign-in screenDoes not applyTest it on your PCDoes not apply

Common Mistakes When You Swap Two Keys on a Keyboard in Windows

The most common mistake when you swap two keys on a Windows keyboard is adding only one of the two mappings, which leaves both keys typing the same character. Six other slips cause most of the remaining trouble.

Common mistake: one row only

With only A to B, pressing A and pressing B both type B. PowerToys warns about the orphaned key; the registry and AutoHotkey do not.

Common mistake: swapping a modifier without an undo step

Remapping Win, Ctrl, Alt or Shift can break gestures and special keys, and AltGr behaves as Left Ctrl plus Right Alt, so touching either key can break it. Write the undo step first.

Common mistake: closing PowerToys

Keyboard Manager stops the moment PowerToys exits. Turn on Run at startup, and check that the tray icon is present after a restart.

Common mistake: overwriting a Scancode Map

A .reg file replaces the whole value. A second swap added this way erases the first one, so combine all pairs in one value.

Common mistake: testing on another layout

PowerToys mappings follow the active input language. A to B on English (US) applies to the physical key that types A on a French layout, so test with the layout you actually use.

Common mistake: trusting a Notepad test alone

An elevated app, a remote session or a game may ignore the swap that Notepad obeyed. Run the four tests in the section above.

Troubleshooting a key swap that stopped working

When a key swap stops working, the cause is usually the tool’s scope, not the mapping: PowerToys not running, an administrator window, a game, or a laptop Fn key. Match your symptom in the table, then run the checklist.

Problem, cause and fix
ProblemLikely causeFix
Swap works in Notepad, not in one programThe program runs as administratorRun PowerToys as administrator, or use the registry method
Swap disappears after a restartPowerToys or the script does not start at sign-inTurn on Run at startup, or add the script to shell:startup
Both keys type the same characterOnly one row was addedAdd the reverse row
Fn key will not mapKeyboard firmware handles FnSwap the keys around Fn instead
Hotkey opens the wrong thingWindows or another app reserves the combinationChoose another combination; Win+G opens Game Bar even when reassigned

This section stays short on purpose. The full symptom list, with causes for Fn keys, remote sessions and keys swapped by accident, lives on a separate page: fixes when swapped keys stop working or will not go back.

Troubleshooting checklist

Tick each item as you rule it out.

Is This Enough? What Else to Do After You Swap Two Keys on a Keyboard in Windows

A swap is only done when you have tested it, written the undo step and checked the places it does not reach: the Fn key, the sign-in screen, administrator windows, games and anyone else who uses the PC.

Score your own setup below. The scorecard is a thinking aid, not a security rating; it simply counts the loose ends that cause most help requests.

Swap risk score card

Answer all five questions.

Does anyone else use this PC?
Do you run games or apps as administrator?
Did you swap a modifier key (Ctrl, Alt, Shift, Win)?
Do you use a laptop Fn layer or a remote session?
Is the undo step written down?

Your result appears here once all five are answered.

How to undo a key swap

Undo steps differ by method, and the registry route is the only one that needs a restart.

Undo steps by method
MethodUndo
PowerToysOpen Remap a key, delete both rows, select OK. Or close PowerToys, or turn off Keyboard Manager.
Scancode MapDelete the Scancode Map value in the Keyboard Layout key, or import the undo file above, then restart. SharpKeys recommends Safe Mode if a mapping locks you out.
AutoHotkeyExit the script from its tray icon and remove its shortcut from shell:startup.

Laptop owners have extra limits to plan around. The page on which laptop keys can be swapped and which cannot lists them.

Editorial pick

Where Macro Keys fits when you swap two keys

We recommend PowerToys for the swap itself and Macro Keys for what a swap cannot do: expanding short triggers into text, launching programs with a key combination, and keeping several clipboard items. Macro Keys does not remap or swap keys.

Macro Keys is a free Windows program from NewSoftwares.net, the developer behind this guide. Its product page lists keyboard macros, text shortcuts, multiple clipboards, a hotkey launcher and macro encryption. It does not list key remapping, so we do not offer it as a swap tool.

The fit is the next problem people hit. After a swap, readers often want a second kind of shortcut: type a few characters and get a full sentence, or press one combination and open a folder. That is the job Macro Keys covers, alongside PowerToys instead of in place of it.

What Macro Keys costs

The official page offers Macro Keys as a free download for Windows and lists it under free apps. Microsoft’s developer site describes PowerToys as free as well. Pricing, version and system requirements are not stated on the Macro Keys page, so we do not quote them.

What it does well
  • Text shortcuts that expand to longer text
  • Hotkey launcher for programs, folders, websites and email
  • Several clipboard items kept and re-pasted
Where it falls short
  • No key swap or remap feature documented
  • No per-keyboard setting documented
  • Version and requirements not stated on the product page

Download Macro Keys free →

Macro Keys window on the Macro Shortcuts tab with an empty list and Add Macro, Edit, Delete buttons
Macro Keys opens on the Macro Shortcuts tab. The Multiple Clipboards and Hotkey Launcher tabs sit beside it.

Features, with where each fits

Macro Keys features from the official page
FeatureBest forNot ideal for
Text shortcutsRepeated phrases, addresses, sign-offsChanging which character a key types
Hotkey launcherOpening a program, folder, website or new emailTyping text into a form
Multiple clipboardsPasting something copied three copies agoLong-term storage of sensitive text
Macro encryption and a start-up passwordA personal PC where others might open the appReplacing PC-level protection

What Keyboard Macros Can Automate

A keyboard macro replaces a repeated action with a short trigger. In Macro Keys, per its product page, that covers replacement text, key combinations that launch programs, folders, websites and email, and a clipboard that keeps several copied items.

Macro types and where each lives in Macro Keys
Macro typeWhat it doesWhere in Macro KeysExample
TextReplaces a trigger with longer textMacro Shortcuts tabTrigger ,sig types a full sign-off
Key sequenceAdds keystrokes such as Tab, Enter or arrows inside a text macroVirtual keyboard in the macro dialogTab between form fields
LaunchOpens a program, folder, website or emailHotkey Launcher tabOpen a project folder
ClipboardPastes an earlier copied item from a numbered slotMultiple Clipboards tabPaste the second last copy
MouseNot listed on the official pageNot documentedUse another tool

Macro type picker

Choose the job to see which macro type fits.

Macros vs keyboard shortcuts vs text expansion

A macro runs a sequence you define, a keyboard shortcut calls one fixed command that an app or Windows already has, and text expansion swaps a typed abbreviation for longer text. Macro Keys covers text expansion and key-combination launching.

The three differ in who defines the action. Ctrl+C belongs to the app. A text expansion belongs to you and runs only when you type its trigger. The side-by-side with a decision helper is on the page that compares a macro, a hotkey and a text expander.

Recording vs scripting macros

In Macro Keys, a macro is built from typed text plus keystrokes added from an on-screen virtual keyboard, not from a script language. A German review describes it as able to record and replay tasks; the official page does not use the word recording.

That difference matters when you choose a tool. A scripting tool such as AutoHotkey can branch, wait and test conditions. A text-based macro tool is simpler and safer to hand to a colleague, but it cannot decide anything. Read the German-language Macro Keys walkthrough on Datacenter-Insider (March 2022) if you want a second description, and try the recording claim on your own copy before relying on it.

Recording Your First Macro

To create your first macro in Macro Keys, open the Macro Shortcuts tab, select Add Macro, type a short trigger in the Macro (Trigger) box, enter the replacement in Text to Send, and select Ok. Type the trigger anywhere and the text appears.

  1. Open Add Macro

    On the Macro Shortcuts tab, select Add Macro at the bottom of the window.

  2. Name the trigger

    Type a short trigger in the Macro (Trigger) box. The screen suggests a short shortcut text that will be replaced with the text to send.

  3. Enter the text

    Type or paste the replacement in the Text to Send box. Use the virtual keyboard buttons for keystrokes such as Tab, Enter, Date or Time.

  4. Select Ok

    The macro appears in the list with its trigger and replacement text.

  5. Test it

    Open Notepad, type the trigger, and confirm the full text appears.

Macro Keys Type Macro and Text to Send dialog with a trigger box, a text box and virtual keyboard buttons
The Type Macro and Text to Send dialog, with the virtual keyboard for simulated keystrokes.

The Options screen has a Use Prefix field, shown with a comma in the official screenshot. A prefix gives every trigger a shape that ordinary words never have, so triggers do not expand by accident.

Sample macro library

Copy-paste ideas. Replace the bracketed parts, and keep passwords and client data out of any macro.

,sigKind regards, [Your name], [Phone]
,ackThank you for your message. I will reply by [day].
,mtgMeeting request with agenda placeholders
,addrReturn address block
,refSupport ticket reference line

Assigning Macros to Specific Keys

Assigning a macro to a key combination happens on the Hotkey Launcher tab in Macro Keys, which the product page describes as a way to launch software, open folders, open websites or send email. Text macros use typed triggers instead.

Launching apps and websites with one key

Pick a combination that Windows and your other apps do not already own. PowerToys documents that Win+L and Ctrl+Alt+Del are reserved by Windows, and that Win+G opens Game Bar even when another tool claims it. Combinations with Ctrl+Alt plus a letter are risky on layouts that use AltGr, because AltGr behaves as Left Ctrl plus Right Alt.

Hotkey conflict checker

Run through these before you assign a combination.

Assigning macros to a second keyboard or keypad

The tools in this guide cannot give a second keyboard its own macros. PowerToys applies mappings to every keyboard, the registry value is machine-wide, and Macro Keys documents no per-keyboard setting.

A macro pad that stores macros in its own firmware or vendor software is the usual route for a dedicated second device. Check that vendor’s documentation for key limits and profile switching, because it is outside the scope of anything here.

Macros for data entry and office workflows

Text macros pay off where the same phrase, address or reference is typed many times a day. A Tab keystroke added to a macro can also step through form fields, so one trigger fills several boxes.

Time-saved calculator

Estimate the typing a text macro replaces.

Macros for Excel and data-entry teams

Excel moves one cell right on Tab and down on Enter, so a macro that types a value, presses Tab, types a second value and presses Tab again can fill a row. Add the Tab and Enter buttons from the virtual keyboard rather than typing a tab character. Keep each macro to one row, and test it on a copy of the sheet.

Macro timing, delays and reliability tips

Macro Keys documents no delay setting, so keep every macro short and let the target app finish loading before you type a trigger. Reliability comes from testing in the exact app where the macro will run, not from a longer sequence. If a window takes two seconds to open a form, wait for the cursor to appear before you fire the trigger.

Safe macro use at work

Get written approval before you run a key-swap or macro tool on a work PC, because these tools sit between the keyboard and every app, which is exactly where IT policy and endpoint security look.

  • Ask your IT team first, even for a per-user install that needs no administrator rights.
  • Never store passwords, card numbers or client data in a text macro or a clipboard slot.
  • Do not use a macro to bypass a workplace control. This guide does not cover that.
  • Share exported macro files only through channels your employer approves.

Fixing Macros That Misfire

A macro misfires for one of five reasons: a trigger that appears inside ordinary words, an elevated target window, a hotkey Windows already owns, a clipboard slot that moved, or a macro file that did not survive a reinstall.

Misfire causes and fixes
What happensCauseFix
Text expands inside a normal wordTrigger has no distinguishing prefixUse the Use Prefix field and start every trigger with it
Nothing happens in one appThe app runs as administratorTest with the tool elevated, or try the app unelevated
Hotkey opens another programWindows or another app owns the combinationChoose another combination
Clipboard slot holds a different itemNew entries are added on topCheck the Add New Entries on Top option in Options
Macros missing after a reinstallNo export file existedExport macros to a file and import them on the new install

The clipboard order depends on the Add New Entries on Top option, and the Fetch Clipboard on Load option pulls current clipboard content when the program starts. If slot /c01 holds something unexpected, those two settings are the first place to look.

The ID.nl article, a Dutch-language hotkey guide that covers Macro Keys (updated December 2022), describes the clipboard history in similar terms.

Macro Keys Multiple Clipboards tab listing numbered clipboard slots with their shortcuts
The Multiple Clipboards tab numbers each saved item with a /c shortcut.

Backing Up and Sharing Your Macros

Macro Keys backs up macros through the Export Macros to File and Import Macros from File buttons, found in Options and in the macro dialog. The Set Path field shows where the macro data folder lives. Copy the exported file to two other places.

  1. Open Options and select Export Macros to File.
  2. Save the file outside the Macro Keys data folder.
  3. Copy it to a second location, then a third on a different device.
  4. On a new PC or after a reinstall, select Import Macros from File.

Treat the exported file like any document that holds your text snippets. Keep it in an encrypted folder or on a password-protected USB drive if the snippets contain anything private, and share it only with people who should see that text.

The three-copy rule

Keep the working copy, one export beside it, and one export on a different device. Check the third copy restores before you need it.

Macro Keys Options window with start with Windows, prefix, import and export, and password settings
Options holds start with Windows, the prefix, import and export, and the start-up password.

Related tools from NewSoftwares.net for keeping macro files private

These tools are developed by NewSoftwares.net, the same team behind Macro Keys. They help with the backup copies and shared-PC situations covered above.

Folder Lock 10

Encrypts and locks files and folders on Windows, a fit for an exported macro file with private snippets.

Windows, paid with free trial listed on the official site

Folder Lock 10 on the official page

USB Secure

Password-protects USB and external drives, useful for the third backup copy.

Windows

USB Secure details

History Clean

Clears browser and Windows traces on a shared PC. It has a free tier.

Windows

History Clean overview

More about the company is on the NewSoftwares.net home page.

Frequently asked questions about swapping two keys on a Windows keyboard

Filter by topic, or read them all.

How to swap two keys on a keyboard in Windows?

Install Microsoft PowerToys, open Keyboard Manager, select Remap a key, and add two rows: A sends B and B sends A. Select OK and the swap works at once. For a machine-wide swap that loads without a running app, write a Scancode Map value in the registry and restart Windows.

Can I swap two keys on a keyboard in Windows without paid software?

Yes. PowerToys, AutoHotkey and the registry Scancode Map method are all free to use. PowerToys needs Windows 11 or Windows 10 version 2004 or later. The registry method needs administrator rights and a restart. None of the three requires a licence key or an account.

What is the fastest way to swap two keys on a keyboard in Windows?

PowerToys Keyboard Manager is fastest once installed: two rows, select OK, and the swap is live without a restart. Expect about five minutes including the download. The registry method takes longer because Windows only reads the Scancode Map value after a restart or a sign-out.

What mistakes should I avoid when I swap two keys on a keyboard in Windows?

Adding only one of the two rows is the usual error: both keys then produce the same character and one key is lost. Also avoid swapping Ctrl, Alt or Win without a written undo step, overwriting an existing Scancode Map value, and testing only in Notepad.

How do I check that it worked after I swap two keys on a keyboard in Windows?

Open Notepad, press each key once and read what appears. Then repeat the test in an app run as administrator, after a restart, and, for the registry method, at the sign-in screen. A swap that passes all four checks is finished.

What is the difference between a macro and a keyboard shortcut?

A keyboard shortcut calls one fixed command that an app or Windows already defines, such as Ctrl+C. A macro is a sequence you define: typed text, keystrokes, or a launch action. Text expansion is the narrow case where a short trigger becomes longer text.

Can I assign macros to a second keyboard?

Not with the tools in this guide. PowerToys documents that mappings apply to all keyboards, the registry value is machine-wide, and Macro Keys documents no per-keyboard setting. A macro pad that stores macros in its own firmware or vendor software is the usual route.

Are keyboard macros allowed at work?

That depends on your employer. Remapping and macro tools sit between the keyboard and every app, so many IT policies restrict them. Ask for written approval first. Never store passwords or client data in a text macro, whatever the policy says.

Will macros work inside every application?

No. A tool that is not elevated usually cannot type into a window running as administrator, and some games read the keyboard through paths that remapping tools never see. Test each macro in the exact app where you plan to use it.

How do I back up my macros?

In Macro Keys, use Export Macros to File in the Options screen or in the macro dialog, then copy the exported file to a second folder and a third location. Use Import Macros from File on the new PC or after a reinstall to bring them back.

How do I undo a key swap in Windows?

Delete the two rows in PowerToys Remap a key, or close PowerToys. For the registry method, delete the Scancode Map value in Keyboard Layout and restart. For AutoHotkey, exit the script from its tray icon and remove it from the Startup folder.

Does swapping keys work on a laptop keyboard?

Mostly yes. Letter keys, Ctrl, Alt, Caps Lock and the function row F1 to F12 can be swapped. The Fn key usually cannot, because the keyboard firmware handles it before Windows sees a keypress. Swap around Fn instead of trying to include it.

Can I swap two keys on only one keyboard?

Not with these tools. PowerToys applies mappings to every keyboard, the registry value is global, and an AutoHotkey remap works on all keyboards by default. If you need a swap on one keyboard only, look at that keyboard’s own driver software or firmware.

Do swapped keys work in games?

Often not reliably. PowerToys warns that Keyboard Manager may reduce frame rates and that some keyboard APIs bypass it, and AutoHotkey notes that some games ignore remaps. The registry method reaches more games because it works below the app layer.

Our verdict

Our verdict: choose the swap method by who owns the PC

Use PowerToys on a PC you own and manage, the registry Scancode Map on a shared or locked PC, and AutoHotkey when the swap must depend on the app in focus. Add Macro Keys when your next need is typed text or launchers, not a swap.

Whatever you pick, follow the two-row rule: both mappings, then the undo step in writing. Test the swap in an elevated app and after a restart, because that is where most swaps fail.

If you came for the swap, you can stop at PowerToys and keep the registry undo file somewhere safe. If you also repeat the same typing every day, Macro Keys is a free place to start.

Download Macro Keys free →

This guide is published by the NewSoftwares.net team, the developer of Macro Keys. We cover free and built-in options alongside our own, and the swap methods here do not depend on our product. Questions or corrections? Contact the developer.

Go deeper