Jump to content

Auto run for accessibility


Borthwick

Recommended Posts

Hey y’all,

 

 I have an old hand injury that makes holding down W for long periods painful. A toggle auto run button would be absolutely massively helpful for me, and I’m sure quite a lot of people with accessibility issues. This game has been so great otherwise!

Link to comment
Share on other sites

On 6/19/2023 at 1:08 PM, Borthwick said:

 I have an old hand injury that makes holding down W for long periods painful. A toggle auto run button would be absolutely massively helpful for me, and I’m sure quite a lot of people with accessibility issues. This game has been so great otherwise!

 

Agreed.

 

There is a solution that is available to you, but it involves using another application: AutoHotkey (AHK). That's a free tool for automating key strokes. When I want to autorun, I type ALT-R and it holds down the W key for me. When I want to stop, I hit the W key.

 

I also have one that helps when mining so that I don't have to hold down the mouse button. ALT-M.

 

There's also ALT-X which is great when you want to break open a Gun Safe with a stone axe.

 

I've included my AHK configuration file, below, for your reference and/or use.

 

The other entries (ALT-9 and ALT-0) aren't probably relevant to you. They help out in the Prefab Editor when I need to quickly scroll through the Parts Window choices.

 

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


;************************************************************
; ONLY FOR 7D2D
;************************************************************
#IfWinActive, 7 Days To Die

;************************************************************
; ALT-R is autorun. W to stop.
;************************************************************
!r::
Send {w up}{w down}
return

;************************************************************
; ALT-M - Hold Down Left Mouse Button
;************************************************************
!m::
Click, Down
return

;************************************************************
; ALT-X - Loop on Left Mouse Button Clicks
;************************************************************
#MaxThreadsPerHotkey 3
!x::
#MaxThreadsPerHotkey 1
if KeepClicking  ; This means an underlying thread is already running the loop below.
{
    KeepClicking := false  ; Signal that thread's loop to stop.
    return  ; End this thread so that the one underneath will resume and see the change made by the line above.
}
; Otherwise:
KeepClicking := true
Loop
{
	Click
	Sleep 750
	; But leave the rest below unchanged.
	if not KeepClicking  ; The user signaled the loop to stop by pressing Win-Z again.
		break  ; Break out of this loop.
}
KeepClicking := false  ; Reset in preparation for the next press of this hotkey.
return

;************************************************************
; ALT-9 - Click 100 times
;************************************************************
!9::
Loop, 100
{
	Click
	Sleep, 25
}
return

;************************************************************
; ALT-0 - Click 10 times
;************************************************************
!0::
Loop, 10
{
	Click
	Sleep, 25
}
return

 

Link to comment
Share on other sites

There are some tools in the web which can make your wishes possible. Just google for keyboard rebind tool, there is also one addition from microsoft theirself for windows, i think it is Microsoft Power Tools. With this i rebound the shortcuts in A.D. 1602 for fastening the game. it is hard coded on F4-F6 and now F6 is triggered when hitting space bar when i play the game. Sadly i have to switch the rebind before every playing, but works well for me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...