Jump to content
FaxMonkey

Making an autorun buttong for logitech G keyboards

Recommended Posts

I just wanted to share this with those of you that have a logitech G keyboard. It's a script for creating an autorun button, to help prevent RSI during those long hiking trips.

This G button just toggles the forward key down (on first press) and then toggles it off on the second press. If you try to do this using the repeat option in the logitech profile software it has problems with enabling sticky keys or making you sprint uncontrolably everytime you press the button.

TO CREATE YOUR AUTORUN BUTTON

Open your logitech gaming software

Go to the profiles section

Right click on your DayZ profile > click 'scripting'

Paste the following into the new 'DayZ - Script' window that just appeared. If it only has the default script then you can delete it and completely replace it. Save the default script into notepad before deleting it if your worried about making a mistake. If you have a custom script already in there then you should know how to add this below bit in.

shiftToggle = false

function OnEvent(event,arg)

if event == "G_PRESSED" and arg == 1 then -- 1 is the G key number, you can change to any other Gkey

shiftToggle = not shiftToggle

if shiftToggle then

PressKey("w")

else

ReleaseKey("w")

end

end

end

Go to the 'Script' menu up the top > click 'Save'. You should get a message below that says something like "(11:06:33) Script Loaded (DayZ)". If there are extra lines or if it says something else the script may be wrong.

Test in Dayz.

It can be slightly fiddly if you press forward and this button at the same time as it will make you sprint. It's pretty easy to get used to though and works pretty well.

Hope it saves some of you some pain.

  • Like 2

Share this post


Link to post
Share on other sites

Don't have a Logitech keyboard but heres how I made an auto run key.

Take 3 pennies.

Stack them together (taping can also help here)

put them on W

Take Wallet

Place wallet on pennies.

TADAAAA Autorun

  • Like 1

Share this post


Link to post
Share on other sites

I just made a macro for my G19, but enlighten me, what advantage does your script have or a macro that is executed when pressed, and disabled when pressed again?

Share this post


Link to post
Share on other sites

I just made a macro for my G19, but enlighten me, what advantage does your script have or a macro that is executed when pressed, and disabled when pressed again?

I have a G15 but sadly do not know how best to take andvantage of it. How to you create a macro to autorun?

Share this post


Link to post
Share on other sites

I have a G15 but sadly do not know how best to take andvantage of it. How to you create a macro to autorun?

Add me on Steam, I'm at work right now. I'll walk you through it later, make sure you have the latest version of the software for your keyboard from Logitech. You also may want to refer to the manual for your keyboard, as the method may be different depending on the software version.

Share this post


Link to post
Share on other sites

Why make it simple if you can waste your time by compiling a script

Open macro editor

Create new macro

Press Record

Tap W

Press Stop Record

Delete the second entry that releases the W key, indicated by an upwards arrow

Close macro editor

Once you hit your macro your character will start running

Hit W once and he stops running

Edited by Hawk24

Share this post


Link to post
Share on other sites

Why make it simple if you can waste your time by compiling a script

Open macro editor

Create new macro

Press Record

Tap W

Press Stop Record

Delete the second entry that releases the W key, indicated by an upwards arrow

Close macro editor

Once you hit your macro your character will start running

Hit W once and he stops running

I just retested this one and it doesn't work for me. I've got a G15. I assume you mean 'multi-key' when you say macro editor.

When I use this method the macro just works like a normal W key. no autorun, only works while it's held down.

Also, Ag3nt Richt3r - if you could post your method that would be good as all the macro's I tested weren't ideal (sprinting, sticky keys, not working in prone or crouching). I'd like to know if there is an easier way.

Share this post


Link to post
Share on other sites

Hold W down, press shift+tab, opens steam overlay, press shift+tab again to close it and it thinks W is being pressed down.

You can do anything you want after that as long, as you are not pressing W then it wont stop moving forward, even pressing S will just make you stand still.

SIMPLE :D

Guide to making steamoverlay work with beta -> http://dayzwiki.com/wiki/index.php?title=How_to_install_DayZ#Make_a_shortcut_to_launch_ARMA2_Beta_with_Steam_Overlay_.28Optional.29

  • Like 1

Share this post


Link to post
Share on other sites

Is this script working for anyone else? It's not working for me. I'm using a Logitech G110.

This is also not working;

Why make it simple if you can waste your time by compiling a script

Open macro editor

Create new macro

Press Record

Tap W

Press Stop Record

Delete the second entry that releases the W key, indicated by an upwards arrow

Close macro editor

Once you hit your macro your character will start running

Hit W once and he stops running

  • Like 1

Share this post


Link to post
Share on other sites

I have a G110, I've done everything right, but what game do I select for "game executable"? Arma2 OA doesnt work.

Share this post


Link to post
Share on other sites

Figured it out by myself a long time ago ... HF

dI2ko.jpg

Edited by NoRegrets
  • Like 4

Share this post


Link to post
Share on other sites

I'm using g keys on g15 v2 keyboard to autorun too. Works like a charm.

If you don't have such a keyboard, you can also use an analogue axis. I've mapped forward in arma2 controls to the slider on my x52 pro throttle. the advantage to using an analogue axis is you can select speed, plus your character will keep running even if you alt tab to desktop. g keys on keyboard stop running when you alt tab.

Share this post


Link to post
Share on other sites

I just start up my iPod and watch Seananners play DayZ while feeling good about myself for having dat shiny m4a3 cco. Oh, and I just keep my finger pressed on the w key, it doesn't help to have crap on your keyboard when shit hits the fan.

Share this post


Link to post
Share on other sites

Don't have a Logitech keyboard but heres how I made an auto run key.

Take 3 pennies.

Stack them together (taping can also help here)

put them on W

Take Wallet

Place wallet on pennies.

TADAAAA Autorun

shut up and take my beans

Share this post


Link to post
Share on other sites

Hold W down, press shift+tab, opens steam overlay, press shift+tab again to close it and it thinks W is being pressed down.

You can do anything you want after that as long, as you are not pressing W then it wont stop moving forward, even pressing S will just make you stand still.

SIMPLE :D

Guide to making steamoverlay work with beta -> http://dayzwiki.com/..._.28Optional.29

Glad to see I'm not the only one to discover this.

Saved my finger a LOT since the coast spawn bugs!

Share this post


Link to post
Share on other sites

Don't have a Logitech keyboard but heres how I made an auto run key.

Take 3 pennies.

Stack them together (taping can also help here)

put them on W

Take Wallet

Place wallet on pennies.

TADAAAA Autorun

Take one penny, press the W key down and insert it between the W and 2/3 keys, then let up on the W key and it should stay down.

Share this post


Link to post
Share on other sites

For the love of God just use the Steam Overlay trick!

Hold down W. Press Shift Tab simultaneously. Click to close the overlay. Done.

Some of us don't use Steam.

Share this post


Link to post
Share on other sites

Much easier way. Go into your dayz controls, change it to "commands" and delete "space" out of the entry, as it does nothing as far as im aware (make sure you do this step!). When I say commands, I mean you can choose vehicle controls, regular etc. I am at work and can't remember the exact name, but pretty sure its commands, or commander. But then change your fast forward bind from w x 2, to space bar. Then holding space bar makes you sprint. Place one end of telephone on space bar and then you dont need to try and access the W key with a banana or your life savings worth of pennies.

Share this post


Link to post
Share on other sites

Mine's slightly different:

function OnEvent(event, arg)

if (event=="G_PRESSED" and arg==2) then

if (toggle==null) then

PressKey(0x11);

toggle=1;

elseif (toggle==1) then

ReleaseKey(0x11);

toggle=nil;

end

end

end

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×