Button maping for Dualshock 4 gamepad via Bluetooth

My button mapping is not quite right. The right-analog-stick is switched with the R2-triger.
I fixed thatt doing THIS.

xboxdrv \
   --evdev /dev/input/event17\
   --evdev-absmap ABS_X=x1,ABS_Y=y1                 \
   --evdev-absmap ABS_Z=x2,ABS_RZ=y2                \
   --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \
   --evdev-keymap BTN_A=x,BTN_B=a                   \
   --evdev-keymap BTN_C=b,BTN_X=y                   \
   --evdev-keymap BTN_Y=lb,BTN_Z=rb                 \
   --evdev-keymap BTN_TL=lt,BTN_TR=rt               \
   --evdev-keymap BTN_SELECT=tl,BTN_START=tr        \
   --evdev-keymap BTN_TL2=back,BTN_TR2=start        \
   --evdev-keymap BTN_MODE=guide                    \
   --axismap -y1=y1,-y2=y2                          \
   --mimic-xpad                                     \
   --silent

But this only worked while wired, it does not work when connected via Bluetooth.
When i connect the gamepad wired or wireless some events show up in /dev/input/, exactly: events 15,16,17 and js0. This /dev/input/by-id/usb-Sony_Computer_Entertainment_Wireless_Controller-event-joystick is just a symlink of /dev/input/event17 . Extra-info: i changed the script because at my pc the gamepad shows as /dev/input/by-id/usb-Sony_Interactive_Entertainment_Wireless_Controller-if03-event-joystick here is a pic.: sss
EDIT:
extra info, maybe usable to you guys:

[fean@Mobius ~]$ sdl2-jstest --list
Found 1 joystick(s)

Joystick Name:     'Sony Interactive Entertainment Wireless Controller'
Joystick GUID:     030000004c050000cc09000011810000
Joystick Number:    0
Number of Axes:     6
Number of Buttons: 13
Number of Hats:     1
Number of Balls:    0
GameController:
  Name:    'PS4 Controller'
  Mapping: '030000004c050000cc09000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,'

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by