Logitech脚本,按住键直到释放

时间:2019-07-31 12:49:55

标签: lua scripting logitech logitech-gaming-software

是否可以使Logitech脚本以字母为目标?

例如> F

如果我想让此Logitech脚本按住5键直到释放鼠标键F,请使用鼠标键5,我该怎么做?

function OnEvent(event, arg)

if event == "MOUSE_BUTTON_RELEASED" and arg == 5 then

PressAndReleaseMouseButton(5);

end

1 个答案:

答案 0 :(得分:0)

function OnEvent(event, arg)
   if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
      PressKey("F")
   end
   if event == "MOUSE_BUTTON_RELEASED" and arg == 5 then
      ReleaseKey("F")
   end
end

但是您可以在不编写脚本的情况下执行相同的操作。
只需通过简单的拖放操作即可将键F绑定到鼠标按钮5。