From 9d927c525ec2cc17e63011f79c0e317fab1f0018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ataberk=20=C3=96zen?= Date: Tue, 24 Jan 2023 02:50:09 +0300 Subject: [PATCH] Add input map for DualShock 4 connected via USB --- resources/inputmaps/dualshock4-usb.json | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 resources/inputmaps/dualshock4-usb.json diff --git a/resources/inputmaps/dualshock4-usb.json b/resources/inputmaps/dualshock4-usb.json new file mode 100644 index 00000000..3b40a5a8 --- /dev/null +++ b/resources/inputmaps/dualshock4-usb.json @@ -0,0 +1,65 @@ +{ + "name": "Playstation DualShock 4 - USB", + "idmatcher": "PS4 Controller", + "mapping": { + // D-Pad + "KEY_BUTTON_12": "down", + "KEY_BUTTON_11": "up", + "KEY_BUTTON_14": "right", + "KEY_BUTTON_13": "left", + + // Square + "KEY_BUTTON_2": "cycle_audio", + + // X + "KEY_BUTTON_0": "enter", + + // Circle + "KEY_BUTTON_1": { + "short": "back", + "long": "home" + }, + + // Triangle + "KEY_BUTTON_3": "cycle_subtitles", + + // L1 + "KEY_BUTTON_9": "seek_backward", + + // L2 + "KEY_AXIS_4_DOWN": "seek_forward", + + // option + "KEY_BUTTON_6": "host:toggleDebug", + + // start + "KEY_BUTTON_4": "host:fullscreen", + + // press left thumbstick + "KEY_BUTTON_7": "", + + // press right thumbstick + "KEY_BUTTON_8": "", + + // Playstation button + "KEY_BUTTON_5": { + "short": "home", + "long": "exit" + }, + + // Trackpad press + "KEY_BUTTON_15": "search", + + // left thumbstick axis + "KEY_AXIS_0_UP": "left", + "KEY_AXIS_0_DOWN": "right", + "KEY_AXIS_1_UP": "up", + "KEY_AXIS_1_DOWN": "down", + + // right thumbstick axis + "KEY_AXIS_3_UP": "increase_volume", + "KEY_AXIS_3_DOWN": "decrease_volume", + "KEY_AXIS_2_UP": "decrease_audio_delay", + "KEY_AXIS_2_DOWN": "increase_audio_delay" + } +}