0


I want to auto mount my pad at js1 when ubuntu starts
the reason i want to do this is i want to play rocket league on steam, and
joystick mounted as js1 is considered the second one so i can only play using it as I would play with a friend
This is all caused because im trying to trick the xbox pad driver to think my pad is also Xbox one using the command

xboxdrv --evdev /dev/input/event19 --evdev-absmap ABS_HAT0X=x1,ABS_HAT0Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_Z=dpad_x,ABS_Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --evdev-keymap BTN_TOP=b,BTN_TRIGGER=x,BTN_THUMB2=a,BTN_THUMB=y,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=rb,BTN_BASE2=rt,BTN_TOP2=lb,BTN_PINKIE=lt,BTN_BASE5=tl,BTN_BASE6=tr --mimic-xpad --silent &

That command creates a "copy" of joystick as js1, so i think if i automount the original one at js1 copy will be created at js0 and game will detect this one

i want to mention, i need to do this, otherwise my joystick is not "seen" by rocket league so i need to use the xbox version. Also, any option to add that command i use to make fake xbox controller to linux when it boots up? I noticed the event number eventually change(when i first run pad it was 19 now it is 18), can i somehow detect it?

0

Okay, I have the question answered, thanks to reddit users as well, they have pointed me the right way to go.
So if anyone of you ever has the same problem, the xboxdrv command is 100% good, but newer games do not use the "js" format input, they use "event" so then when you run steam you just input
SDL_JOYSTICK_DEVICE=/dev/input/event20 (where event20 is number of event
xboxdrv "emulates", may vary)
instead of
SDL_JOYSTICK_DEVICE=/dev/input/js1 (this also varies depending on how many
input devices you have)

0

Another approach is to hide the undesired js0 by removing all permissions from it.

The game won't be able to open js0, and it will use js1 as its first controller.

This approach can handle the case where you have multiple controllers duplicated by software like xboxdrv.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.