Page 1 of 1

Inserting text with one key

Posted: 08 Aug 2020, 11:34
by Liaml2002
I'm new to this, is it possible to press one key and it inserts a sentence. For example if i press the number 1 key it would replace it with. "Hey, how can I help you?

Re: Inserting text with one key

Posted: 21 Sep 2020, 08:54
by emielo
Found in on: https://2ndkeyboard.webnode.nl/uitleg-luamacros/

In LuaMacros:

-- 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 == 97) then

lmc_send_keys ('Hey, how can I help you?')




elseif (button == 49) then
lmc_send_keys ('Hey, how can I help you?')

else print('Not yet assigned: ' .. button)
end
end)