Inserting text with one key
Inserting text with one key
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
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)
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)