The purpose of this project is to create a mouse and keyboard emulator to interface with the PS Connect app for use with MacOS.
Original project is archived and not active here. Implementing the open pull request by willoftw that will probably never be merged from the dead repository. This version of the code is verified to work with macOS Catalina 10.15.6 with PS Connect and a disk-edition PS5.
ShockEmu requires the OS X command line development tools to be installed. Installation steps
only_keyboard.se
goes like this:
git clone https://github.com/bji219/ShockEmu_PS5.git
./build.sh <filename>.se
./run.sh
Key Mapping listed here
./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.
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 (nomanssky.se
) for a breakdown of the format.
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 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.
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.
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!
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.
- The main use case for me would be playing Elden Ring through PS Connect. For that game, the mouseLook mapping for the camera motion controls is very stuttering and impossible to play. Maybe someone can find a better way to change the settings from the eldenring.se file below:
# Map mouse to the right stick
mouseLook.type = linear # 1:1 translation mode, no curve
mouseLook.stick = right
mouseLook.multY = -1 # Flips the Y axis for mouseLook
mouseLook.deadZone = .05 # Sets the dead zone for the joystick
mouseLook.decay = 5 # What the joystick movement is divided by at each tick (probably does very little)
- The "shift" mapping for me does not work. I tried mapping both the "O" button and R1 for the PS5 controller to shift and it does not seem to work