Multi keyboard remapper

Download the latest from here: Follow the discussion here

Multi keyboard remapper allows you to plug in a second keyboard (and maybe more, I’ve not tried it), and re-map any key to any other key sequence (a.k.a macro) on the second keyboard only , i.e. no messing up your primary keyboard. The remapped keys can be shifted, controlled, alt’ed, windows’ed with either left or right side meta keys. This tool will work for any application or game or as a desktop utility for automating any common task, such as entering login name and password. It runs on windows 7 and up (64 bit); no mac, don’t ask.Multi Keyboard Remapper


So, how to map a second keyboard to a keyboard shortcut command macro?

To get started, unzip the folder from the above link and place it somewhere on your computer.

First, you must run install-interception. This tool must be run from an administrator command line. You must run cmd as administrator.

The easiest way to do that is in your windows search box, type ‘cmd’ then right click on Command Prompt and choose ‘Run as administrator’. Then cd to where you put the remapper folder. Then run install-interception without arguments to receive instructions.

After you install and do the necessary reboot your system, look at the DCS_remapper.txt file. This is an example of what you need to create.

Then you need to find the hardware ID for your second keyboard. Easiest way is to run remapper.exe with no args. But here’s the thing, YOU MUST TYPE THE COMMAND FROM THE KEYBOARD YOU WANT TO REMAP. It will print the hardware ID of the keyboard you hit enter on. Note that you do not need to run cmd as admin for remapper to work, so a standard cmd shell is ok.

Then right click in the cmd window and select ‘Mark’, then select that hardware ID, then Ctrl-C to copy it.

Next, create a .txt config file or edit mine. The first line MUST be the hardware id. So paste your hardware id into the first line. See DCS_remapper.txt for an example. Note that this id should not change for that particular keyboard, so you only have to do this once (I think?).

The lines following the hardware id are key mappings for that keyboard. The format is simple:
input_key remapped_key comment

input_key is almost any key on your keyboard, except Print screen, Pause, Escape, Function, Num lock, Shift, Control, Alt and Windows. For the exact way to specify a key name, scroll down to the end of this page for a full list.
NOTE: YOU CANNOT ENTER THINGS LIKE ‘S-B’ IN REMAPPER ON THE LEFT SIDE. Only one press, unmodified keys are supported as an input_key and input_key MUST be the first character on the line.

If the first character is a space (not “Space” but an actual space), the line is ignored so you can put a comment there.

If the first character on the line is a # followed by 4 hex digits (hex is base 16, 0-9 and A-F) then the key scancode is used directly. So for example “#e049 X” will map the Page Up key to x. This is useful if you are using a non standard keyboard and cannot enter the key by its name. Look for the scancode when you press an unassigned key, the console will say ‘bypassing scan code XXXX’ where XXXX is the scan code you should use in the config file.

remapped_key is the key you want to output, i.e. remap to from the list at the end of this page. Tou can add left or right side meta keys as follows:
Left Shift S-
Right Shift rS-
Left/Alt A-
Right/Alt rA-
Left Control C-
Right Control rC-
Left Windows W-
Right Windows rW-

NOTE: that i’m lazy, you can do combinations of shift, ctrl, etc but they must be in this sequence, shift – control – alt – windows, so for example, in the DCS documentation, View enemies mode is “rC-rS-End”, the remap must be entered as “rS-rC-End”.

To enter multiple (up to 16) remapped keys, put them in a comma separated list, like this:

F1 rS-F1,C-A-Num5    This maps the F1 key to right shift F1, followed by Alt+Ctrl+Num5

comment is not used but maybe someone might make something to create a printable keyboard label sheet based on this data.

So for example, “/ rS-rC-Num/ Cockpit Camera Move Back” takes the ‘/’ key from the 2nd keyboard and re maps it to “right shift+right ctrl+num pad /”. Easy, in’it!

So, to run the remapper, simple type ‘remapper.exe DCS_remapper.txt’ (you can make a .bat file to make it faster, see run.bat).

Then you can test by opening notepad or something and hit a key on your remapped keyboard and you should see the new keys come up. You should also see that the same key on your main keyboard is what is should be. For testing like this, stick to remapps that use only unmodified or shifted keys since ctrl and alt will not show up in notepad.

Notice that if you didn’t add a remap a key to the config file on your remap keyboard, the key will act as normal.

Then that’s it, open your game or application, and your old keyboard that you’ve had laying in a scrap parts box for years, can see new life as a custom keyboard macro input device, for free!

Note that the 2 keyboard should be of different make and model (well, at least model) or the hardware ID codes may come up the same. I may add support for 3 or more keyboards if enough people show interest (see below)

This application is totally free with no advertising but please help me, the developer, continue to improve the application by donating $5.

This project is based on with many thanks to Francisco Lopes for the amazing job he did figuring out all he windows internals. His package does all the magic shit, I just put a control application and config format together.

There are several keyboard remappers on the market at the moment but all work on every connected keyboard, my remapper is the only one that works on second keyboard only, leaving the primary unchanged.



List of key names and their scan code
“A”, 0x1E
“B”, 0x30
“C”, 0x2E
“D”, 0x20
“E”, 0x12
“F”, 0x21
“G”, 0x22
“H”, 0x23
“I”, 0x17
“J”, 0x24
“K”, 0x25
“L”, 0x26
“M”, 0x32
“N”, 0x31
“O”, 0x18
“P”, 0x19
“Q”, 0x10
“R”, 0x13
“S”, 0x1F
“T”, 0x14
“U”, 0x16
“V”, 0x2F
“W”, 0x11
“X”, 0x2D
“Y”, 0x15
“Z”, 0x2C
“0”, 0x0B
“1”, 0x02
“2”, 0x03
“3”, 0x04
“4”, 0x05
“5”, 0x06
“6”, 0x07
“7”, 0x08
“8”, 0x09
“9”, 0x0A
“`”, 0x29
“-“, 0x0C
“=”, 0x0D
“\\”, 0x2B
“Backspace”, 0x0E
“Space”, 0x39
“Tab”, 0x0F
“Caps”, 0x3A
“Enter”, 0x1C
“F1”, 0x3B
“F2”, 0x3C
“F3”, 0x3D
“F4”, 0x3E
“F5”, 0x3F
“F6”, 0x40
“F7”, 0x41
“F8”, 0x42
“F9”, 0x43
“F10”, 0x44
“F11”, 0x57
“F12”, 0x58
“[“, 0x1A
“Insert”, 0x52 | KEY_E0
“Home”, 0x47 | KEY_E0
“PageUp”, 0x49 | KEY_E0
“Delete”, 0x53 | KEY_E0
“End”, 0x4F | KEY_E0
“PageDown”, 0x51 | KEY_E0
“Up”, 0x48 | KEY_E0
“Left”, 0x4B | KEY_E0
“Down”, 0x50 | KEY_E0
“Right”, 0x4D | KEY_E0
“Num/”, 0x35 | KEY_E0
“Num*”, 0x37
“Num-“, 0x4A
“Num+”, 0x4E
“NumEnter”, 0x1C | KEY_E0
“Num.”, 0x53
“Num0”, 0x52
“Num1”, 0x4F
“Num2”, 0x50
“Num3”, 0x51
“Num4”, 0x4B
“Num5”, 0x4C
“Num6”, 0x4D
“Num7”, 0x47
“Num8”, 0x48
“Num9”, 0x49
“]”, 0x1B
“;”, 0x27
“‘”, 0x28
“,”, 0x33
“.”, 0x34