ShockEmu
ShockEmu copied to clipboard
Keyboard+Mouse to Dualshock 4 emulation for PS4 Remote Play (OS X)
Key Mapping
only_keyboard.se goes like this:

Setup
./build.sh only_keyboard.se
./run.sh
It depends on your system having PS4 Remote Play installed at /Applications/RemotePlay.app. If this is not the case, you'll need to modify run.sh accordingly.
The OS X Command Line Tools needs to be installed.
Relies on python2 (see #2), which can be installed via brew install python@2
SE File Format
SE files are, generally speaking, a mapping between an input key, mouse button, or mouse movement to a DualShock 4 input. See the example file (example.se) for a breakdown of the format.
How It Works
ShockEmu works by intercepting the IOHID calls of PS4 Remote Play application and presents an emulated DualShock controller. It also hooks into the input routines of the application, to catch keyboard and mouse inputs, which then get mapped according to your SE file.
But It Is Not Working!
You may have to turn off System Integrity Protection via 'csrutil' in order for DYLD_INSERT_LIBRARIES to function on the newest macOS. Thanks Ben for figuring this out!
Pro Tip
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"
👆🏻ShockEmu repo location must be updated according to your machine.