Multi-Keyboard Setup
Here is the full bundle of scripts and programs needed for the steps below. The steps will have the individual download links, but I thought it would be helpful to just toss everything in a zip for you.

  1. Head over to GitHub and grab a copy of the luamacros.zip program

  1. Hit up AutoHotkey.com and install that

  1. Save this lua script in your lua folder from the first step as keyboard_detection.lua


  1. Open keyboard_detection.lua in your favorite editor and let’s change the top few lines to fit your setup. The first line is an array of your extra keyboards and the name(s) you’ve bestowed on them.

devices={"Lefty","Logi","Rolly"}

  1. For every keyboard you have in the above array, it needs to be individually registered to the lmc_assign_keyboard function.

lmc_assign_keyboard('Lefty');
lmc_assign_keyboard('Logi');
lmc_assign_keyboard('Rolly');

  1. Save those changes; we’re done with that file.

  1. Now, we need the lua functions library for controlling the output of the keystrokes and their respective keyboards they came from. Save this file as functions.lua in the same location where we put keyboard_detection.lua.


  1. Open functions.lua in your editor and adjust the output file on line 5 to suit your needs.

file = io.open("c:\\dev\\logs\\lua.txt", "w")

  1. Save and close that file when you’re done.

  1. Let’s make sure LuaMacros is working before we move on to the next steps. Locate the application and start it up.


  1. Click the Open existing file button on the Lua interface.


  1. Locate keyboard_detection.lua and click Open.


  1. Once the script is loaded into Lua, click the Play button.