Page 1 of 1

hotkeys barely working

Posted: 28 Jun 2018, 21:10
by gryvix
I have an issue in a program where the macros barely work, like it works 1 out of 100 times or such in a program: streamlabs obs: https://streamlabs.com/

the macros work fine in the few other programs I've tried responsively, just no this program.

this is the code (a modified quicks/lua)

Code: Select all

-- assign logical name to macro keyboard
lmc_assign_keyboard('MACROS');

-- define callback for whole device
lmc_set_handler('MACROS',function(button, direction)
  if (direction == 1) then return end  -- ignore down
  if (button == 111) then lmc_send_keys('{F13}')
  elseif (button == 106) then lmc_send_keys('{F14}')
   elseif (button == 109) then lmc_send_keys('{F15}')
    elseif (button == 107) then lmc_send_keys('{F16}')
     elseif (button == 96) then lmc_send_keys('{F17}')
      elseif (button == 97) then lmc_send_keys('{F18}')
       elseif (button == 98) then lmc_send_keys('{F19}')
       elseif (button == 99) then lmc_send_keys('+{F1}')
       elseif (button == 100) then lmc_send_keys('+{F2}')
  else print('Not yet assigned: ' .. button) 
  end
end)
I use it with a usb keypad, the buttons are recognised as numbers ie. 1 = 97 (dunno if this is normal).
(also I have second keyboard connected to this computer, but the issue continues when I disconnected it)
any clue what could be the problem?
thanks in advance

Re: hotkeys barely working

Posted: 29 Jun 2018, 08:21
by admin
Find out first if macro id not activated or if the lmc_send_keys doesn't work.
It means put some print command to the callback handler.

Re: hotkeys barely working

Posted: 29 Jun 2018, 15:25
by gryvix
Image

dunno if that is what you wanted, I can do very basic scripting stuff...
I found out that the program is using Electron as a frontend,
] Ocgineer [EN/NL]: @Gryvix yes front end uses electron / typescript. backend is C++ currently devs are working on IPC to have a stable two way communication between the front- and OBS Studio core backend
I guess luamacros is working fine and nothing can be done on your and my end. I guess I'll file a report at streamlabs and see if they can fix it soon/

thanks a lot for helping tho!