only_keyboard.se
goes like this:
It depends on your system having PS Remote Play installed at /Applications/RemotePlay.app
. If this is not the case, you'll need to modify run.sh
accordingly.
The latest Command Line Tools
needs 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_LIBRARIES
to function on the newest macOS. (Thanks Ben for figuring this out!)
./build.sh only_keyboard.se
./run.sh
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.
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.
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"
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! 🎮