PS4 Controller touchpad to mouse adapter

About

PS4PC is a lightweight executable that maps touchpad input on the PS4 controller to your cursor. Currently, there is no GUI and all options must be changed via the command line. The defaults for the application (running it without setting any command line parameters) will set the scaling to the resolution of your primary display and the mouse mode to relative.

Relative movement translates the movement on the touchpad to movement of your cursor. This movement is not scaled, so you should be able to reach any point on any monitor.

Absolute movement translates the point your finger touches on the touchpad into a position on your primary monitor by scaling the resolution of the touchpad to match the resolution of your monitor. If your monitor resolution is higher than 1920x1080, it will be impossible to reach certain points on your monitor. This currently only works on your primary monitor.

Absolative movement is a combination of absolute and relative movement. The first time you touch the touchpad, your cursor will be moved to that absolute position. Any further movements after this touch will be translated as relative movements. This mode can allow you to quickly move the mouse from one side of the screen to the other without sacrificing the ability to make small adjustments. This currently only works on your primary monitor.

Pressing the touchpad down will press the left mouse button down. Releasing the touchpad will release the left mouse button. Tapping on the touchpad will cause a mouse click to occur (press and release).

Known Issues

  • Touchpad does not work when connected wireless via Bluetooth.
  • Movement with small deltas causes the mouse to jump due to a change in the contact point.

Future Enhancements

Application - General
  • Taskbar 'Running' indicator
  • Enable touchpad to work via Bluetooth.
  • Enable loading configuration from XML/Properties file.
  • Map DirectInput -> XInput
  • Rumble Support
  • Lightbar color changing
Application - GUI
  • Expose current configuration values in a GUI.
  • Create a button -> keyboard shortcut mapper.
Button Mapping
  • Button -> Keyboard Shortcut mapping
  • Custom button mapping
Monitor
  • Multiple-monitor support for absolute movement
  • Delta-based input scaling
Touchpad
  • Relative movement
  • Absolute+Relative movement
  • Touchpad press mapping
  • Tap-to-Click
  • Improved movement with small deltas.
  • Precision configuration
  • Gesture support

Help Text

Usage: ps4pc [OPTION]...

Translates PS4 touchpad input into absolute, relative, or absolative mouse movement.

-h, --help
Show this help message.
-m, --mouse MODE

Specify the mouse movement mode. Defaults to relative.
absolute: map touchpad to your resolution, placing the mouse at your finger location.
absolative: map touchpad to your resolution, placing your mouse at your finger location. Subsequent movement is relative from that location.
relative: moves the mouse from the current location based on your finger movement, scaled to your resolution.

-x WIDTH
Specify the X resolution to use for scaling [defaults to primary monitor X resolution].
-y HEIGHT
Specify the Y resolution to use for scaling [defaults to primary monitor Y resolution].

Example
ps4pc.exe -m absolative -x 1920 -y 1200

Change Log

0.0.6-ALPHA
  • Added taskbar icon and the ability to exit the application without ending the task.
  • Reduced resolution smoothing of relative movement.
  • Implemented tap-to-click.
  • Included msvcp110.dll in the ZIP.
  • Modified logging to additionally write to ps4pc.log.
0.0.5-ALPHA
  • Added the ability to set a custom X,Y scaling instead of using the primary monitor.
0.0.4-ALPHA
  • Implemented absolative touchpad movement.
  • Implemented mapping of touchpad press event to left mouse click.
0.0.3-ALPHA
  • Implemented relative touchpad movement.
0.0.2-ALPHA
  • Implemented absolute touchpad movement.
0.0.1-ALPHA
  • Implemented default DirectInput button mapping.