How to Assign Macros to a Second Keyboard or Keypad on Windows
A spare keyboard or macro pad can become a dedicated macro board, but Windows does not tell keyboards apart. This page covers the three working routes and the limits of each.
Windows sees every keyboard as one input source, so a second keyboard needs extra help. The simple route is a keypad that sends F13 to F24, which you map with any tool. The exact route is AutoHotkey with AutoHotInterception. PowerToys cannot tell keyboards apart.
Why a second keyboard is hard on Windows
Windows merges all attached keyboards into one stream. A key pressed on the second keyboard looks identical to the same key on the first, so a macro tool cannot see which board you used. PowerToys documents this, and a Microsoft Q&A answer confirms it.
PowerToys Keyboard Manager states that per-device mappings are not supported because it cannot tell keyboards apart. A Microsoft Q&A thread reaches the same conclusion for Windows in general. Anything that works around this must either get the information from a driver or make the second keyboard send keys the first one never does.
The three routes compared
You can separate a second keyboard by sending unique keys from it, by using a driver-level library, or by using the macro software that came with the device. Unique keys are simplest, and the driver route is the only one that works with an ordinary second keyboard.
| Route | How it works | Effort | Limits |
|---|---|---|---|
| Keypad sends F13 to F24 | Program the pad so its keys send rarely used function keys, then map those in any tool | Low | Needs a programmable pad; PowerToys documents F13 to F24 as remappable |
| AutoHotkey with AutoHotInterception | A library built on the Interception driver reads input per device, so hotkeys can fire from one keyboard only | High | Installs a driver; needs scripting; AHK v1 and v2 supported |
| Vendor software on the device | The maker’s tool stores macros on the pad | Low | Tied to that device; not covered here |
Route 1: use F13 to F24 on a macro pad
Most programmable pads can send F13 to F24, keys that standard keyboards do not print. Program each pad key to send one of them, then assign your macro to that key in PowerToys, AutoHotkey or another tool. Windows treats them as ordinary keys.
- Program the padUse the maker’s tool to set each pad key to send F13, F14 and so on. Save the layout to the device if it supports on-board storage.
- Check the key arrivesOpen a key tester or Notepad. An F13 press may show nothing, so use a tool that reports key codes.
- Map it in your macro toolIn PowerToys Keyboard Manager, remap a shortcut and press the pad key to record it. In AutoHotkey, write
F13::Send "text". - Test with the main keyboardConfirm the main keyboard does not trigger the macro, then confirm a reboot keeps the pad layout.
Route 2: AutoHotkey with AutoHotInterception
AutoHotInterception is an AutoHotkey library built on the Interception driver, and it lets a script react to one chosen keyboard. It handles ordinary second keyboards, at the cost of installing a driver and writing a script that identifies the device.
Plan for an afternoon the first time. You install the driver, restart, find the device identifier of the keyboard you want to isolate, and write hotkeys that apply to that device only. A driver-level tool sees every keystroke, so install it only from its official project page and only on a PC where you control the software.
For the rules on workplace use, read using keyboard macros at work safely.
What does not work
Several tempting approaches fail. PowerToys cannot map one keyboard only, Windows Settings has no per-keyboard layout for macros, and a text expander cannot check which device typed an abbreviation. Plan around these limits instead of searching for a hidden setting.
- PowerToys Keyboard Manager: no per-device mappings.
- Text expanders: they match typed words, not devices.
- Sign-in screen: macro tools generally do not run before you log in.
- Bluetooth keyboards that sleep: the first key press may be lost, so build a short pause into important macros.
Macro Keys, from NewSoftwares.net, fits route 1: map a hotkey or comma trigger once the pad sends distinct keys. Its official page documents no per-keyboard mapping, so it cannot separate two ordinary keyboards on its own.
Questions about second keyboards and macro pads
Six short answers cover support, safety, key choice and restarts. They are written for readers with a spare keyboard or a macro pad who want dedicated macro keys without disturbing their main typing setup.
Yes, with extra steps. Windows merges keyboards into one input, so either make the second board send unique keys such as F13 to F24 or use a driver-based library. AutoHotkey with AutoHotInterception can act on one keyboard only.
Only as a source of different keys. Its documentation says per-device mappings are not supported, because it cannot tell keyboards apart. If a pad sends F13 to F24, PowerToys can remap those keys like any other.
They are function keys beyond F12 that exist in the Windows key set but are missing from most keyboards. Because nothing else uses them, they are safe for macros. Many programmable pads can send them.
It relies on the Interception driver, which sits low in the input path and sees all keystrokes. Install it only from the official project, only on a PC you control, and not on a managed work PC without approval.
Yes if the tool starts with Windows and the pad stores its layout. Check both after a restart. A pad that stores nothing on the device needs its vendor software running.
Not always. A spare keyboard works with AutoHotInterception. A pad is simpler because it sends unique keys by design, and a cheap programmable one is enough for F13 to F24.