Tutorial:App filter script
Posted: 22 Dec 2015, 12:23
print('Version: ' .. lmc.version)
--lmc.minimizeToTray = true
--lmc_minimize()
lmc_print_devices()
lmc_device_set_name('kb2', 'D0E7FD3')
lmc_set_handler('kb2',function(button, direction)
tt=lmc_get_window_title()
print(tt)
if (direction == 1) then return end -- ignore down
if (string.match(tt, "Chrome")) then
if (button == 97) then lmc_send_keys("^{TAB}")
elseif (button == 98)then lmc_send_keys("^+{TAB}")
else print('Not yet assigned: ' .. button)
end
else
end
if (string.match(tt, "lua")) then
if (button == 97) then lmc_send_keys("1")
elseif (button == 98)then lmc_send_keys("2")
else print('Not yet assigned: ' .. button)
end
else
end
end
--lmc.minimizeToTray = true
--lmc_minimize()
lmc_print_devices()
lmc_device_set_name('kb2', 'D0E7FD3')
lmc_set_handler('kb2',function(button, direction)
tt=lmc_get_window_title()
print(tt)
if (direction == 1) then return end -- ignore down
if (string.match(tt, "Chrome")) then
if (button == 97) then lmc_send_keys("^{TAB}")
elseif (button == 98)then lmc_send_keys("^+{TAB}")
else print('Not yet assigned: ' .. button)
end
else
end
if (string.match(tt, "lua")) then
if (button == 97) then lmc_send_keys("1")
elseif (button == 98)then lmc_send_keys("2")
else print('Not yet assigned: ' .. button)
end
else
end
end