罗技鼠标Lua编程:30毫秒间隔按键和G4/G5功能实现
EnablePrimaryMouseButtonEvents(true) \n\nfunction OnEvent(event, arg) \n -- 键盘按下事件 \n if event == "MOUSE_BUTTON_PRESSED" and arg >= 1 and arg <= 5 then \n PressMouseButton(arg) \n Sleep(30) -- 30毫秒延迟 \n ReleaseMouseButton(arg) \n end \n \n -- 鼠标按键事件 \n if event == "G_PRESSED" then \n if arg == 4 then \n -- G4键位执行某个功能 \n -- TODO: 在这里写下G4键位要执行的功能代码 \n elseif arg == 5 then \n -- G5键位关闭G4功能 \n -- TODO: 在这里写下G5键位要执行的功能代码 \n end \n end \nend
原文地址: https://www.cveoy.top/t/topic/pTi5 著作权归作者所有。请勿转载和采集!