Need Some Help - Syntax Issue

Announcements, questions
Post Reply
surge42
Posts: 3
Joined: 26 Sep 2019, 02:33

Need Some Help - Syntax Issue

Post by surge42 » 26 Sep 2019, 04:08

This guy's video (Asq Gaming) provides the following code which generates simple macros which print multiple keys when one key is depressed.

Code: Select all

lmc_device_set_name('OBS','AA6362C')
lmc_print_devices()

lmc_set_handler('OBS', function(button,direction)
  if (direction == 1) then return end 
  if (button == 67) then
    lmc_send_keys('%^{g}', 50)

    elseif (button == 86) then
    lmc_send_keys('%^{B}', 50)
  end
end
) 
Any idea why nothing prints when button 67 and 86 are pressed? FYI: The code will work if %^ are removed.

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Need Some Help - Syntax Issue

Post by admin » 26 Sep 2019, 07:55

I think {} are for special key names, did you try with regular brackets - %^(g)?
Or send the sequence using lmc_send_input which gives you more possibilities
Petr Medek
LUAmacros author

Post Reply