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
User avatar
RickC
Outfitter
Posts: 1357
Joined: December 8th, 2008, 8:45 pm
Location: Colorado

Need help with a programmable keyboard

Postby RickC » 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
User avatar
VonStratos
Hunter
Posts: 821
Joined: February 7th, 2013, 6:32 pm

Re: Need help with a programmable keyboard

Postby VonStratos » May 23rd, 2018, 11:15 pm

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.

Image
Signature Stats

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

Re: Need help with a programmable keyboard

Postby Fletchette » May 23rd, 2018, 11:57 pm

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: 1357
Joined: December 8th, 2008, 8:45 pm
Location: Colorado

Re: Need help with a programmable keyboard

Postby RickC » May 24th, 2018, 2:26 pm

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!

Return to “Need help? Support & Technical Issues”

Who is online

Users browsing this forum: No registered users and 1 guest