So I received my motospeed keybad in the mail today and started working away at installing and writing some lua scripts into LuaMacros. I have the general keybinding working so far to go up to F24. Now I would like to cycle those F 13 through F24 again with modifiers like left or right control + f13 - 24.
The issue I am having is with the num key on the keypad, while i have it set in the lua code to be left control and F13, it still turns on and off the numlock. I'm having trouble figuring out how to ignore the numlock funcion of the keypress. This is what i have so far, how do i ignore the numlock key function?
Code: Select all
-- These 2 lines will minimize the script automatically at launch.
--lmc.minimizeToTray = true
--lmc_minimize()
-- assign name to external keyboard
lmc_device_set_name ('KP', 'MyKeypadId');
-- define callback for whole device
lmc_set_handler('KP',function(button, direction)
if (direction == 1) then return end -- ignore down
if (button == 96) then lmc_send_keys('{F13}')
elseif (button == 110) then lmc_send_keys('{F14}')
elseif (button == 13) then lmc_send_keys('{F15}')
elseif (button == 97) then lmc_send_keys('{F16}')
elseif (button == 98) then lmc_send_keys('{F17}')
elseif (button == 99) then lmc_send_keys('{F18}')
elseif (button == 100) then lmc_send_keys('{F19}')
elseif (button == 101) then lmc_send_keys('{F20}')
elseif (button == 102) then lmc_send_keys('{F21}')
elseif (button == 103) then lmc_send_keys('{F22}')
elseif (button == 104) then lmc_send_keys('{F23}')
elseif (button == 105) then lmc_send_keys('{F24}')
elseif (button == 144) then lmc_send_keys('^{F13}')
else print('Not yet assigned: ' .. button)
end
end)