Need help with a programmable keyboard
Posted: May 23rd, 2018, 11:00 pm
Need some help with a script for a Logitech G710+ keyboard
I am disabled and use an oversized trackball to aim and fire. This takes both of my hands so holding breath was not an option for me until I got the above programmable keyboard.
With the help of a member here I have a script that uses my G4 key to toggle the "up" key on and off. Press G4 to press and hold down the up key, press again to release. The hold breath function is bound to the up arrow key.
This has worked for a long time, but now has stopped working.
Below is my script. Could anyone here tell me why this is not working?
function OnEvent(event, arg, family)
if arg == 4 then -- change number to Gkey you want
if event == "G_PRESSED" then
toggle = not toggle
if toggle then
PressKey("up")
else
ReleaseKey("up")
end
end
I am disabled and use an oversized trackball to aim and fire. This takes both of my hands so holding breath was not an option for me until I got the above programmable keyboard.
With the help of a member here I have a script that uses my G4 key to toggle the "up" key on and off. Press G4 to press and hold down the up key, press again to release. The hold breath function is bound to the up arrow key.
This has worked for a long time, but now has stopped working.
Below is my script. Could anyone here tell me why this is not working?
function OnEvent(event, arg, family)
if arg == 4 then -- change number to Gkey you want
if event == "G_PRESSED" then
toggle = not toggle
if toggle then
PressKey("up")
else
ReleaseKey("up")
end
end