Adaptation of TaranVH's original LuaMacros code, since I don't want to use Intercept.
A lot of the code is reorganized and genericized, but should work the same as his.
NOTE: I am currently using this myself, however I'm only using a keypad, and can't check most of the keyboard. The keypad works great, though!
Additional note: there are two .AHK script files in the "Scripts" folder. Only one is needed. Feel free to work off of 2nd-keyboard-commands-blank.ahk
and ignore 2nd-keyboard-commands-custom.ahk
.
A quick-start guide for using a second keyboard purely for macros on Windows.
Watch the video first, then take a look at the instructions below.
(These instructions are mostly the same ones written by Taran. If they need to be clarified, just let me know, or submit a pull request!)
- Ensure that both your keyboards are plugged in.
- Download and install LuaMacros and AutoHotkey.
- Download this project and extract it.
- If for some reason you can't, download
2nd-keyboard-commands-blank.ahk
,send-keypresses-to-ahk.lua
, andkeypressed.txt
from this GitHub repository, by clicking on the RAW button for each, and then selecting FILE > SAVE AS. Save them all into the same folder.
- If for some reason you can't, download
- Open
send-keypresses-to-ahk.lua
using LuaMacros.exe, which will allow you to view and modify the code. You'll need to change the file path ofkeypressed.txt
at least. - Click on the "play" arrow button. An identification window should pop up. Press any key on your 2nd keyboard, and LuaMacros will identify that device as your 2nd keyboard.
- Typing on your 2nd keyboard should no longer work, since LuaMacros is now intercepting and blocking those keystrokes.
- Press the spacebar on your second keyboard, then check
keypressed.txt
to see if it now contains the string "space". If so, you got it working! - Run
2nd-keyboard-commands-blank.ahk
and you should be good to go!2nd-keyboard-commands-blank.ahk
has no functions initially. You can write your own or copy/paste some from my2nd-keyboard-commands-custom.ahk
, but you'll probably need to modify them to fit your own system and needs.
-
DIY 87-Key Macro Keyboard by Taran of LinusTechTips
-
The Art of the Bodge by Tom Scott