2nd-keyboard icon indicating copy to clipboard operation
2nd-keyboard copied to clipboard

Cannot separate my standard keyboard and the macro board

Open Zelatrix opened this issue 6 years ago • 10 comments

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?

Zelatrix avatar Apr 15 '19 21:04 Zelatrix

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'    

Wegerich avatar Apr 15 '19 22:04 Wegerich

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

Zelatrix avatar Apr 15 '19 22:04 Zelatrix

Are they both the same model of keyboard? if so, it won't work.

TaranVH avatar Apr 15 '19 23:04 TaranVH

One of my keyboards is an Aukey keyboard, and the other one is a Logitech board.

Zelatrix avatar Apr 15 '19 23:04 Zelatrix

I'm not able to help. It's been years since I've used luamacros.

TaranVH avatar Apr 15 '19 23:04 TaranVH

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)

Matesaktesak avatar Apr 16 '19 05:04 Matesaktesak

It fires according to an if else statement. Like

If (key == 'q')
{
     ; Do something
}

Zelatrix avatar Apr 16 '19 10:04 Zelatrix

@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.

Wegerich avatar Apr 16 '19 11:04 Wegerich

@Zelatrix Ok, when you type on the "typing" keyboard, does the file change?

Matesaktesak avatar Apr 16 '19 15:04 Matesaktesak

Please use QMK and close this issue!

PotatoJet avatar Jul 24 '20 08:07 PotatoJet