I decided to write a quick On-Screen Joystick program as there really don’t seem to be many out there. This was done purely for myself as I wanted to be able to play cloud games from Gamepass without having to connect a physical joystick.
The basic program shows a box with various directions and joystick/gamepad buttons shown as icons. Left clicking an icon simulates the corresponding joystick/gamepad button being pressed.
The program is far from perfect, the controls sometimes stick, you have to run any game in windowed mode, some games just don’t see a joystick, you can’t press two buttons at once (this makes running and jumping pretty impossible) and the UI is pretty ugly. I do not know whether I will improve it in the future or not. I really just needed a basic On-Screen Joystick so I could test games without having a physical one connected to my computer.
Saying that there are improvements I’d like to make. Diagonal movement would be useful, maybe a second stick for turning in first person games, hovering over icons rather than pressing them…..
I wrote this using AutoHotKey as it was basically a proof of concept and AHK is very simple to use. This does lead to limitations though. Using a more powerful language would allow me to create a virtual joystick without relying on vJoy, the UI wouldn’t be so limited either and things could be more easily adapted. That would be a big project though and I really don’t have the energy.
If anyone else wants to take this further feel free. For now it is what it is and comes with no support, warranty etc. use at your own risk.
On-Screen Joystick System Requirements :
- Windows 10 x64 or later
- vJoy installed and set up
On-Screen Joystick Installation :
- Download and install vJoy from https://sourceforge.net/projects/vjoystick/
- Set up a basic virtual joystick using the Configure vJoy program. I set up a basic 8 button joystick, see image below.
- Download On-Screen-Joystick-v0.2
- Extract the contents of the zip file to a folder of your choosing
- Double Click the On-Screen-Joystick-v0.2 icon to run it
The game you want to use must be in focus for On-Screen Joystick to work. If you accidentally click outside of the game window you will lose control. Also the game needs to be running in windowed mode and not fullscreen mode. Some games will work, others won’t.
Using Gamepass :
To get my program to work with Gamepass requires some more effort. Microsoft have decided to only allow certain controllers to work for cloud gaming. This means that you need to trick windows into seeing your virtual joystick as an Xbox gamepad.
For this to work you need to download and install VIGEm framework. After this install XOutput and follow the instructions given.
Here’s a handy little video about that
You will need to run my On-Screen Joystick calibration tool to map the x and y axis, this can be found in the On-Screen-Joystick-v0.2 zip file. After mapping the x and y axis close the calibration tool and run On-Screen-Joystick-v0.2 to map the other buttons, if you don’t do this the range will be off and you will only be able to move in two directions!
I have published this as I find it useful little accessibility tool, I’m hoping it may also be of use for others too. It comes as is, there’s no warranty, I accept no liability for any damage that may be caused from using it and offer no support.
The source ahk file is included in the zip file, credit goes to the Autohotkey forum, itjhstwerks and evilc for the original scripts and libraries I used and modified for this project.