Thanks my friend for your answer.
Unfortunately it doesn't work
This is my code:
Code: Select all
elseif (button == 40) then
lmc_send_keys ('^+%({NUM1}{NUM5}{NUM1})', 50)
I want to use this shortcut [CTRL+SHIFT+ù] in visual studio code to comment a line.
---------------------------------------------------------------------------------------
I have another issue with luamacros (instead everything is fine with hidmacros

): if i configure a shortcut with my 'chinese' numpad, for example pressing NUM9 (pgup) i get as result that in the Visual Studio code the cursor goes to the top of the page and, at that point, it runs the code in Luamacros. How can i avoid this behavior? I think this is due to the fact that pressing NUM9 i get two numbers, one on key pressed and one on key released...
Code: Select all
clear()
lmc_device_set_name('visualStudioCode','9BEA9')
lmc_print_devices()
lmc_set_handler('visualStudioCode', function(button,direction)
if (direction == 0) then return end
-- formatta codice --
if (button == 36)
then lmc_send_keys('+%f', 50)
-- duplica linea --
elseif (button == 38)
then lmc_send_keys('^+d', 50)
-- cancella linea --
elseif (button == 33)
then lmc_send_keys('^+k', 50)
Thanks again for your help!
P.S.
There is a little documentation for all the methods (like lmc_send_keys()) ? I want to know what arguments each method takes, for example.