Open Zelatrix opened 5 years ago
It sounds like LM is taking input from both keyboards and using it to write to the file, which AHK is reading?
In which case the problem is in Lua Macros, and your device ID is probably not set properly.
Try plugging your 2nd keyboard into a different USB port then, what does this part of your code say?
-- 'Set this to 0000AAA for your first run
local keyboardIdentifier = '0000AAA'
That part of my code remains the same. Why would changing the USB port edit the code? Also, you say I might not be entering the device ID correctly. If I have the following message in the terminal, which part would be the ID?
Handle = 141428825
SystemId = \\?\HID#VID_046D&PID_C31C&MI_00#7&6E38DAB&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD}
Name = MACROS
Type = keyboard
Are they both the same model of keyboard? if so, it won't work.
One of my keyboards is an Aukey keyboard, and the other one is a Logitech board.
I'm not able to help. It's been years since I've used luamacros.
A stupid question (don't take it bad), but does your AHK really fire with the things that are written in the file, or does it fire on a keypress? (Like A:: Return)
It fires according to an if else statement. Like
If (key == 'q')
{
; Do something
}
@Zelatrix Your ID would be 6E38DAB
in that case.
Changing the USB port doesn't change the code but it can change the device ID in my experience.
@Zelatrix Ok, when you type on the "typing" keyboard, does the file change?
Please use QMK and close this issue!
I am trying to get the second keyboard working with Lua Macros, and I can get it working inside of LM; when I press a key on the second keyboard, it will write to the file on disk, but when I launch my AHK script, both of my keyboards will trigger the macros that I have defined inside that script. How do I separate the macro keyboard from the normal one, so that I can use one in standard typing?