Code: Select all
clear()
lmc_device_set_name("numpad", "8343707")
lmc_set_handler('numpad', function(btn, dir)
print(btn, dir)
end)
Code: Select all
clear()
lmc_device_set_name("numpad", "8343707")
lmc_set_handler('numpad', function(btn, dir)
print(btn, dir)
end)
Code: Select all
clear()
lmc_log_all();
lmc_log_spool('this_will_be_long.log')
lmc_device_set_name('Remote', '10BCEBFB');
lmc_set_handler('Remote',string.byte('Z'),0,function(button, direction)
lmc_send_input(string.byte('Y'), 0, 0) -- press Y
lmc_send_input(string.byte('Y'), 0, 2) -- release Y
end)
Code: Select all
2019-03-02 09:25:47:389 [HOOK]: Hook message: key code 46 [46], repeat 1, scan code 83, extended 1, alt 0, previous DOWN, direction UP
2019-03-02 09:25:47:390 [HOOK]: Raw message not yet arrived for key 46 direction 0, trying PeekMessage.
2019-03-02 09:25:47:390 [KBD]: RAW message: message WM_KEYUP, key code 46, extended 0, flags 3, makecode 83, direction DOWN, keyboard handle 65603
2019-03-02 09:25:47:391 [HOOK]: PeekMessage got 1 messages.
2019-03-02 09:25:47:391 [HOOK]: Key log match for key 46 direction 0, time diff 0 ms.
2019-03-02 09:25:51:220 [KBD]: Found keyboard \\?\HID#VID_046D&PID_C232#2&20CF3930&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} handle 2295637.
2019-03-02 09:25:51:220 [KBD]: Found keyboard \\?\HID#VID_2319&PID_00B2&MI_03#7&10BCEBFB&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} handle 65607.
2019-03-02 09:25:51:221 [KBD]: Found keyboard \\?\HID#VID_046D&PID_C07E&MI_01&COL01#7&14C93907&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} handle 65605.
2019-03-02 09:25:51:221 [KBD]: Found keyboard \\?\HID#VID_1E7D&PID_3264&MI_00#7&3891A56&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} handle 65603.
2019-03-02 09:25:51:221 [LUA]: Added handler 3 for device Remote, key 90, direction 0
2019-03-02 09:25:51:222 [LUA]: Lua worker: finished simple code, length 302, execution time: 1 ms
2019-03-02 09:25:51:222 [LUA]: Lua worker: queue size is 0, suspending thread...
2019-03-02 09:25:51:222 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:51:223 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:51:223 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:51:223 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:51:224 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:51:224 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:57:147 [KBD]: RAW message: message WM_KEYDOWN, key code 90, extended 0, flags 0, makecode 21, direction UP, keyboard handle 65607
2019-03-02 09:25:57:398 [KBD]: RAW message: message WM_KEYUP, key code 90, extended 0, flags 1, makecode 21, direction DOWN, keyboard handle 65607
2019-03-02 09:25:57:398 [LUA]: Calling handler 3 for device Remote, key 90, direction 0, ts 2891093
2019-03-02 09:25:57:399 [LUA]: Item callback id 3, int params 90, 0, 2891093 added to queue making it 1 items big.
2019-03-02 09:25:57:399 [LUA]: Lua worker: resumed...
2019-03-02 09:25:57:399 [LUA]: Lua worker: starting procedure callback id 3, int params 90, 0, 2891093, queue size is 1
2019-03-02 09:25:57:400 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:57:400 [KBD]: Sending input vk:89, scan:0, flags:0
2019-03-02 09:25:57:400 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:57:401 [KBD]: Sending input vk:89, scan:0, flags:2
2019-03-02 09:25:57:401 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:57:401 [LUA]: Lua worker: finished callback id 3, int params 90, 0, 2891093, execution time: 1 ms
2019-03-02 09:25:57:402 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:57:402 [LUA]: Lua worker: queue size is 0, suspending thread...
2019-03-02 09:25:57:403 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:57:403 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:57:403 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:57:404 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:57:404 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:57:405 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:57:405 [KBD]: RAW message: message WM_KEYDOWN, key code 89, extended 0, flags 0, makecode 0, direction UP, keyboard handle 0
2019-03-02 09:25:57:405 [KBD]: RAW message: message WM_KEYUP, key code 89, extended 0, flags 1, makecode 0, direction DOWN, keyboard handle 0
2019-03-02 09:25:57:960 [KBD]: RAW message: message WM_KEYDOWN, key code 90, extended 0, flags 0, makecode 21, direction UP, keyboard handle 65607
2019-03-02 09:25:58:149 [KBD]: RAW message: message WM_KEYUP, key code 90, extended 0, flags 1, makecode 21, direction DOWN, keyboard handle 65607
2019-03-02 09:25:58:149 [LUA]: Calling handler 3 for device Remote, key 90, direction 0, ts 2891843
2019-03-02 09:25:58:150 [LUA]: Item callback id 3, int params 90, 0, 2891843 added to queue making it 1 items big.
2019-03-02 09:25:58:150 [LUA]: Lua worker: resumed...
2019-03-02 09:25:58:151 [LUA]: Lua worker: starting procedure callback id 3, int params 90, 0, 2891843, queue size is 1
2019-03-02 09:25:58:151 [KBD]: Sending input vk:89, scan:0, flags:0
2019-03-02 09:25:58:151 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:58:152 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:58:152 [KBD]: Sending input vk:89, scan:0, flags:2
2019-03-02 09:25:58:152 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:58:153 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:58:153 [KBD]: RAW message: message WM_KEYDOWN, key code 89, extended 0, flags 0, makecode 0, direction UP, keyboard handle 0
2019-03-02 09:25:58:155 [LUA]: Lua worker: finished callback id 3, int params 90, 0, 2891843, execution time: 4 ms
2019-03-02 09:25:58:156 [LUA]: Lua worker: queue size is 0, suspending thread...
2019-03-02 09:25:58:156 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:58:156 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:58:157 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:58:157 [CFG]: Getting boolean MINIMIZETOTRAY
2019-03-02 09:25:58:157 [CFG]: Getting boolean AUTORELOAD
2019-03-02 09:25:58:157 [CFG]: Getting boolean STATISTICS
2019-03-02 09:25:58:158 [KBD]: RAW message: message WM_KEYUP, key code 89, extended 0, flags 1, makecode 0, direction DOWN, keyboard handle 0
2019-03-02 09:26:02:440 [SPE]: Speech worker: resumed...
2019-03-02 09:26:02:443 [LUA]: Lua worker: resumed...
Code: Select all
lmc_device_set_name('SAP','20D7E92')
lmc_print_devices()
lmc_set_handler('SAP', function(button,direction)
if (direction == 1) then return end
if (button == 97) then
lmc_send_keys('XRWP{DOWN 1}', 50)
elseif (button == 98) then
lmc_send_keys('+{F5}', 50)
elseif (button == 99) then
lmc_send_keys('^c', 50)
end
end
)