Full WASD key control with a single Switch! (Kingdom Classic)

Subscribers:
113
Published on ● Video Link: https://www.youtube.com/watch?v=ODiOss3ocns



Duration: 1:33
29 views
0


Thanks to Steve Crane for this really cool Auto hotkey script (see further down). I can play Kingdom Classic with just one Switch!

With my Switch interface device I can send F9 and F6 to my pc with two assistive switches. When this script is active F9 alternate/toggles A and D . After a long press it instead alternates W and S toggle. One Switch = access to all WASD! And the toggle function is really good for the game Kingdom Classic.

Auto Hotkey Is a really impressive tool and you could build nearly any assistive keyboard/switch setup, tailored to different users and games. I'm thinking of a Scanning interface with quick presses to cycle through different Directional arrows/W-A-S-D and perhaps also like Enter key and activate by keeping button pressed. You could play quite complex Open world games with just one or two keys. Combine it with eye tracking software like Alt Controller or Project Iris to access many more keys and camera controls.

THE SCRIPT
-------------------
#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.

#SingleInstance force
#NoEnv
#InstallKeybdHook
#UseHook On

global strafe:= true
global key:="a"

F6:: Suspend

F9::
TimeOut:= false
buttDown:= true
setTimer TimeIsUp, -1000

While (buttDown and !TimeOut)
Sleep 10

if TimeOut
{
soundBeep
KeyWait, F9
strafe:= !strafe
key:= getKey()
}
else
{
Send {%key% down}
KeyWait, F9, D
Send {%key% up}
key:=getKey()
}
Return

F9 Up::
buttDown:=false
return

TimeIsUp:
TimeOut:=true
Return

getKey()
{
if global strafe
{
if (key = "a")
{
return "d"
}
else
{
return "a"
}
}
else
{
if (key = "w")
{
return "s"
}
else
{
return "w"
}
}
}







Tags:
Auto Hotkey
Assistive switches
assistive technology
adaptive technology
switch interface
Tecla-e
ESP32
Kingdom
Kingdom Classic
gaming