Need help with a programmable keyboard

Have a problem? Not sure what to do? Check here for helpful answers. Please Read the Guides First :D
Post Reply
User avatar
RickC
Outfitter
Posts: 1447
Joined: December 8th, 2008, 8:45 pm
Location: Colorado
Contact:

Need help with a programmable keyboard

Post by RickC »

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
User avatar
VonStratos
Outfitter
Posts: 3020
Joined: February 7th, 2013, 6:32 pm
Contact:

Re: Need help with a programmable keyboard

Post by VonStratos »

I don't know much about programing, but if you are using mainly one hand to control the game, and that hand is the one that aim and shoot, then one solution may be to get a gaming mouse like the old reliable Razer Naga or similar, those mouse have many shortcut buttons so you can have many function in one hand, of course it depend on your budget, but if you can spare the money they can be very useful. And i hope someone can help you more with that script.

ImageImage
"Turkeys...the only animal smarter than man."
User avatar
Fletchette
Trophy Hunter
Posts: 7317
Joined: September 10th, 2013, 8:30 pm
Location: Missouri, USA
Contact:

Re: Need help with a programmable keyboard

Post by Fletchette »

RickC wrote: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
Assuming that's the entire script, then it looks like there are (2) end statements missing at the bottom....There should be 4.
Personal Bests...
Image
Image
User avatar
RickC
Outfitter
Posts: 1447
Joined: December 8th, 2008, 8:45 pm
Location: Colorado
Contact:

Re: Need help with a programmable keyboard

Post by RickC »

Fletchette wrote: Assuming that's the entir1e script, then it looks like there are (2) end statements missing at the bottom....There should be 4.
That fixed it, Thank you!
Post Reply

Return to “Need help? Support & Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest