how to solve double hit?

Announcements, questions
Post Reply
teamzhangmeng
Posts: 2
Joined: 28 Sep 2020, 05:07

how to solve double hit?

Post by teamzhangmeng » 28 Sep 2020, 05:19

hello,everyone!
This is my first Lua programme.when i press key once the result is double hit
how to solve double hit ? when i press key slowly,lua just excute one time
thank you~

lmc.minimizeToTray = true
lmc_minimize()
lmc_device_set_name('kb1','1EC44D52')
lmc_print_devices()
lmc_set_handler('kb1',function(button, direction)
if (button == 101) then lmc_send_keys('A')
end
end)

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

Re: how to solve double hit?

Post by admin » 29 Sep 2020, 07:34

Read this: https://github.com/me2d13/luamacros/wiki/Triggers
The callback is called once for key down event and second time for key up.
Petr Medek
LUAmacros author

Post Reply