Gaming peripherals usually come with their own software for remapping keys and buttons, but it only works with that brand's hardware. Free tools can remap any keyboard or mouse in Windows: turn Caps Lock into Ctrl, swap two keys, make a mouse's side buttons do something in a game that doesn't support them, or build full macros. This guide compares four free tools using their developers' own documentation; Forge PC hasn't tested every feature on every game, and some online games' rules restrict macros, so check before you use automation in competitive play.
The short version
Tool | Best for | Keyboard | Mouse | How it works | Licence |
|---|
PowerToys Keyboard Manager | Most people | Yes | No | Runs in the background with PowerToys | Free, from Microsoft |
SharpKeys | Set-and-forget key swaps | Yes | No | Writes a Windows Registry key; no background app | Free, open source (MS-PL) |
AutoHotkey | Macros and complex remaps | Yes | Yes | Scripts you write | Free, open source (GPLv2) |
X-Mouse Button Control | Mouse buttons and per-app profiles | Sends keystrokes | Yes | Background app with profiles | Free |
Best overall: PowerToys Keyboard Manager
Microsoft's PowerToys includes Keyboard Manager, which remaps single keys and shortcuts through a simple editor. According to Microsoft, you can:
Swap one key for another (press A, get B) or swap two keys' positions.
Map a key to a shortcut, such as Ctrl to Win + Left Arrow.
Remap shortcuts, for example to copy with Alt + C instead of Ctrl + C.
Map a key or shortcut to a text string, so a key can type "Hello!".
Apply shortcut remaps globally, or only in a particular app.
There are limits. Microsoft says remaps only work while PowerToys is running in the background. Win + L and Ctrl + Alt + Del can't be remapped because Windows reserves them, the Fn key usually can't be remapped, and Win + G often opens Xbox Game Bar even when reassigned. Microsoft also says new installations from PowerToys 0.100 open a redesigned editor by default, with a toggle to switch back to the old one.
Choose it if you want quick key and shortcut changes with a friendly interface. Our PowerToys guide covers its other tools.
Best for permanent key swaps: SharpKeys
SharpKeys doesn't remap anything itself. Its developer explains that it manages a Windows Registry key that controls key remapping, a feature Windows has had since Windows 2000. You choose a "from" key and a "to" key (it can detect most keys when you press them), click Write to registry, then log out and back in, or restart, for the change to take effect.
Because Windows does the remapping, there's no app running in the background. The trade-off is that it's keyboard-only, key-to-key only, and applies to every app and every keyboard on the PC.
Choose it if you want to disable Caps Lock or swap two keys permanently and forget about it.
Best for macros: AutoHotkey
AutoHotkey is a free, open-source scripting language for Windows. Its developers describe it as a way to define hotkeys for the mouse and keyboard, remap keys or buttons, create autocorrect-style text replacements, and automate desktop tasks. A simple remap is a single line of script, but AutoHotkey can also handle multi-step macros, app-specific behaviour and custom windows.
The catch is the learning curve: everything is a script. If you automate gameplay with it, check the game's rules first, as some online games restrict macros.
Choose it if you want macros, text expansion or anything the other tools can't do.
X-Mouse Button Control (XMBC) is a free tool for remapping mouse buttons and the scroll and tilt wheel. Its developer lists:
Application and window-specific profiles that switch automatically as the pointer moves over a program.
Up to 10 layers of button settings per profile, switched with hotkeys or mouse buttons.
Simulated keystrokes, media controls, clipboard actions, timed button actions and app launching.
Mapping keys to the 4th and 5th buttons in games and programs that don't support them natively.
It supports Windows 10 and 11. The developer notes it's a hobby project and isn't affiliated with any mouse maker.
Choose it if your mouse's software is poor or missing, or you want per-app button layouts.
What about your peripheral's own software?
Brand apps such as Logitech G HUB and Razer Synapse handle device settings that free Windows tools don't, and Razer says its mice store the last-used Synapse profile. They're also where you change DPI and polling rate; see how to change mouse DPI and sensitivity and how to change mouse polling rate. If you're shopping, see the best gaming keyboards and the best gaming mice.
Our verdict
PowerToys Keyboard Manager is the best free remapping tool for most people. Use SharpKeys for permanent key swaps with nothing running in the background, X-Mouse Button Control for mouse buttons and per-app profiles, and AutoHotkey when you need real macros.