Skip to content

Instantly share code, notes, and snippets.

@Lain818
Last active August 30, 2019 19:33
Show Gist options
  • Save Lain818/9d4442c0b1e631b9058d56a4adfc10aa to your computer and use it in GitHub Desktop.
Save Lain818/9d4442c0b1e631b9058d56a4adfc10aa to your computer and use it in GitHub Desktop.
Define Keyboard within LuaMacros
clear() --clear the console from last run
local keyboardIdentifier = '0000AAA'
if keyboardIdentifier == '0000AAA' then
lmc_assign_keyboard('MACROS');
else lmc_device_set_name('MACROS', keyboardIdentifier);
end
--This lists connected keyboards
dev = lmc_get_devices()
for key,value in pairs(dev) do
print(key..':')
for key2,value2 in pairs(value) do print(' '..key2..' = '..value2) end
end
print('You need to get the identifier code for the keyboard with name "MACROS"')
print('Then replace the first 0000AAA value in the code with it. This will prevent having to manually identify keyboard every time.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment