Skip to content

Parrot023/Secondary_MACRO_keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secondary MACRO keyboard for Windows

This project is about making a fully functional secondary macro keyboard for Windows. This have been done before but i did it in a slightly different way as 95% of all coding will be done in Auto hotkey. This is because i found that finding help for LuaMacros can be quiet hard. Autohotkeys scripting language isnt as good as lua. But finding help for Auto Hotkey is easier than finding help for LuaMacros. Once you have 2nd_keyboard.lua set up you almost never have to touch it again. Therefore most problems you will run into will be about Auto Hotkey

Credit

Thanks to them for the inspiration for this project

Here is how to do it if you want to try my code

Keep in mind following along might require a little bit of computer knowledge.

1. Download the neccescary programs and files

2. Get the id of your secondary keyboard

Open up LuaMacros and open the file Get_key_codes.lua. You will be prompted to press a button on your secondary keyboard. The program will then output a list of all connected devices. Something like this:

MACROS  :  \\?\HID#VID_045E&PID_0745&MI_00#7&E77A16&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} [1049237] :  keyboard
<unassigned>  :  \\?\ACPI#MSFT0001#4&30E7D4BA&0#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} [65604] :  keyboard
Total number of devices: 2

In my case you see i have two devices connected. MACROS is the device you just identified by pressing a key on your secondary keyboard. To the right of MACROS we have a long string, This is a combo of the device type and id. My secondary keyboard has the id: PID_0745 you find the id between the 2 first &. Example:

?\HID#VID_045E **&PID_0745&** MI_00#7&E77A16&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD}

Note down your keyboard id. You will need it at step 3.

3. Configure file: 2nd_keyboard.lua

Open up LuaMacros and open the file 2nd_keyboard.lua. Now change the variable kbID with the keyboard id you just noted

local kbID = 'You secondary keyboard id';'

4. Run it and cross you fingers

With 2nd_keyboard.lua open in LuaMacros click the little blue play button this will run the program (hopefully without errors). Now double click on the file Main.ahk this will run it and you will see a little green H in your task bar. Try and type 5 on your numberpad on the secondary keyboard. If your keyboard types 🤯 Congrats you now have a secondary MACRO keyboard. All macros can be configured in the Main.ahk file

Side notes:

Auto Hotkey documentation

If you are new to Auto Hotkey you can find the documentation here Its an excellent tool for creating som really powerfull macros

Run on startup

if you want these files to run on startup you can move the file 2nd_kb_run_on_startup.bat to

C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Just make sure to change the paths in the file to the paths of your files. If you havent moved anything since you downloaded it the the path to LuaMacros will most likely be:

C:\Users\Username\Downloads\luamacros

And the path to Main.ahk wil probably be:

C:\Users\Username\Downloads\Secondary_MACRO_keyboard\Main.ahk

If this is the you only need to change Username to whatever your username is.

About

A tutorial on how to set up a secondary MACRO keyboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors