ShockEmu
ShockEmu copied to clipboard
Keyboard support for Dualshock emulation for PS Remote Play (macOS)
Key Mapping
only_keyboard.se goes like this:

Requirements
-
It depends on your system having PS Remote Play installed at
/Applications/RemotePlay.app. If this is not the case, you'll need to modifyrun.shaccordingly. -
The latest
Command Line Toolsneeds to be installed. -
Relies on
Python 3(kudos to willoftw).brew install python -
You have to turn off System Integrity Protection via 'csrutil' in order for
DYLD_INSERT_LIBRARIESto function on the newest macOS. (Thanks Ben for figuring this out!)
Setup
./build.sh only_keyboard.se
./run.sh
SE File Format
SE files are, generally speaking, a mapping between an input key to a DualShock input. See the only_keyboard.se file for a breakdown of the format.
How It Works
ShockEmu works by intercepting the IOHID calls of PS Remote Play application and presents an emulated DualShock controller. It also hooks into the input routines of the application to catch keyboard inputs, which then get mapped according to your SE file.
Pro Tips
Launch from Terminal
The alias below allows for typing play / enter anywhere in Terminal and have RemotePlay.app launched with the above keys mapped:
$ cat ~/.zshrc | grep play
alias play="pushd [REPOSITORY_ROOT]; ./run.sh &; popd"
Launch from Terminal + Key Mapping Image
Have Preview opening the key mapping image for you and RemotePlay.app launched:

Save this script somewhere (e.g.: [SCRIPT_DIR]/play.sh)
#!/bin/bash
SHOCK_EMU=$'[REPOSITORY_ROOT]'
open -a Preview $SHOCK_EMU/Images/KeyMapping.png
pushd $SHOCK_EMU
./run.sh &
popd
chmod a+x it and create an alias that looks like this:
$ cat ~/.zshrc | grep play
alias play=[SCRIPT_DIR]/play.sh
Enjoy! 🎮