Menu

Home

Alexandre Hardy

A linux userspace device driver that allows joystick events to be remapped. Several joysticks can be combined into a single controller, and button/axes events can be remapped to new joystick, keyboard or mouse events. Advanced scripting also supported.

For a graphical UI to program the joystick (using this software) please see https://rb3d.nl/rb3d/joymixerUI.html


Project Admins:


Discussion

<< < 1 .. 3 4 5 (Page 5 of 5)
  • Francis Serrano

    Francis Serrano - 2019-10-08

    Thank you so much for this driver Mr. Hardy! This script is incredible for mapping to my PS3 Controller into the PiFBA Emulator on RetroPie in my old Raspberry Pi Model B rev.1.2. It works finely with one player, but I want ask you how can I configure the map file for map my keyboard to the two same PS3 Controllers. The provider ID and product ID are the same, only change his Handlers (js0,js1,event0, etc).

    I tried adding id=0, id=1 and device=0,device=1 to the map file but not working.

    Thank you very much!

    Regards from Chile!

     
  • Shawn

    Shawn - 2020-08-02

    I am trying to get this to work with a Hotas Warthog. I am having problems just mapping the axis through... I want to use this tool to combine some saitek rudder pedals with the warthog so I can have one virtual stick I could use in space sims like freespace 2 open. But when I just try to map the axis straitfowardly like:
    axis vendor=0x044f product=0x0402 src=0 target=joyaxis axis=0
    axis vendor=0x044f product=0x0402 src=1 target=joyaxis axis=1
    axis vendor=0x06a3 product=0x0763 src=2 target=joyaxis axis=2

    It doesn't work and the curser is in the lower right quadrant, maxed at 32767. Any help or examples would be greatly appreciated.

     
  • Shawn

    Shawn - 2020-08-02

    I am trying to get this to work with a Hotas Warthog. I am having problems just mapping the axis through... I want to use this tool to combine some saitek rudder pedals with the warthog so I can have one virtual stick I could use in space sims like freespace 2 open. But when I just try to map the axis straitfowardly like:
    axis vendor=0x044f product=0x0402 src=0 target=joyaxis axis=0
    axis vendor=0x044f product=0x0402 src=1 target=joyaxis axis=1
    axis vendor=0x06a3 product=0x0763 src=2 target=joyaxis axis=2

    It doesn't work and the curser is in the lower right quadrant, maxed at 32767. Any help or examples would be greatly appreciated.

     
  • Anthony S

    Anthony S - 2020-12-29

    Just wanted to share my post on reddit on how to setup Linux Joystick Mapper with DOSBox on RetroPie 4.7.2 https://www.reddit.com/user/ajscilingo/comments/kmn5nw/configuring_dosbox_to_work_with_linux_joystick/

    Hope this helps someone looking to use this project with DOSBox on RetroPie... Edit Still haven't managed to get the HAT working on my controller but maybe someone can add on to this?

     

    Last edit: Anthony S 2020-12-30
  • Stephen Anderson

    Anthony S, regarding the HAT not working. Did you notice anyone having trouble with getting HAT buttons working ? Hope it may assist.

     
    • Anthony S

      Anthony S - 2021-01-02

      Hi Stephen thanks for that, my gamepad's HAT is also being mapped to axis 16 and 17, and it too has three values -1, 0 and 1. I assumed that the 3 and 4 axis values reported by jstest were correct, but then I added your code and saw in stderr that they were in fact 16 and 17. In any case I didn't need to remap the values I used the following in my map for things to work correctly for me. How come you're re-mapping the values to 0, 128 and 255?

      axis vendor=0x2dc8 product=0x2865 src=17 target=kbd minus="up" plus=down flags="trinary"
      axis vendor=0x2dc8 product=0x2865 src=16 target=kbd plus=right minus=left flags="trinary"
      
       

      Last edit: Anthony S 2021-01-02
      • Stephen Anderson

        Good to hear.
        I mapped the values to 0, 128, 255 to replicate function of other axis. From memory the direct mapping was not working for me.

         
  • Norbert Harrer

    Norbert Harrer - 2021-01-31

    Hi. Awesome tool.
    I am struggling a bit with how to differentiate two identical controllers.

    In /proc/bus/input/devices:

    I: Bus=0006 Vendor=0002 Product=0001 Version=0100
    N: Name="Multisystem joystick"
    P: Phys=input0
    S: Sysfs=/devices/virtual/input/input2
    U: Uniq=
    H: Handlers=event2 js0
    B: PROP=0
    B: EV=b
    B: KEY=1 0 0 0 0 0 0 0 0 0
    B: ABS=3
    
    I: Bus=0006 Vendor=0002 Product=0001 Version=0100
    N: Name="Multisystem joystick"
    P: Phys=input1
    S: Sysfs=/devices/virtual/input/input3
    U: Uniq=
    H: Handlers=event3 js1
    B: PROP=0
    B: EV=b
    B: KEY=1 0 0 0 0 0 0 0 0 0
    B: ABS=3
    

    A simple map file looks like this:

    axis vendor=0x0002 product=0x0001 src=0 target=joyaxis device=0 axis=0
    axis vendor=0x0002 product=0x0001 src=1 target=joyaxis device=0 axis=1
    

    The output of loadmap looks like this:

    1 joysticks.
    joystick0 axes=2 buttons=0.
    Found device   Raspberry Pi Internal Keyboard (vendor=0x04d9, product=0x0007)
    Found device   Raspberry Pi Internal Keyboard (vendor=0x04d9, product=0x0007)
    Found device Multisystem joystick (vendor=0x0002, product=0x0001)
    Found device Multisystem joystick (vendor=0x0002, product=0x0001)
    Found device JOYMAP Code Device (vendor=0x00ff, product=0x0000)
    0 button assignments.
    2 axes assignments.
    

    It seems like it always maps only the second controller. Is there a way to specify which one I want to use as source in the map file? Thanks a lot.

     
    • Alexandre Hardy

      Alexandre Hardy - 2021-02-14

      Hi!

      The original joymap code was actually designed for my own use, and thus has some shortcomings when it comes to duplicate devices. The original design goals:
      1. Consistently identify devices in a HOTAS setup (joystick, throttle and rudder pedals) even after reboots and hotplug events.
      2. Allow programmability of targets.

      That is a very broad statement, and was never written down. But the point was to identify devices by their vendor and product id so that the software tolerates reboots and hotplug events and consistently identifies devices correctly, even if they received different "js?" numbers due to the order in which they are detected.

      I never added support for identifying a joystick by the linux device identifier (or /dev/input/js?) so today we still have an issue that you cannot tell the software which device to use if there are multiple devices with the same vendor and product identifiers.

      There are others with the same request, but I am not sure when I will get time to implement that. I have a number of other commitments at the moment which will probably delay support for multiple devices with the same identifiers for some time. If you have programming experience, you are welcome to attempt to add that feature.

      I have no objections to anyone creating forks of the project to add whatever they need, and can even advertise what they have done here. Patches are also welcome, although I may be a bit more fussy about what I would like to maintain :-).

      Kind regards
      Alexandre

       

      Last edit: Alexandre Hardy 2021-02-14
    • Alexandre Hardy

      Alexandre Hardy - 2023-10-03

      Hi!

      joymap-0.5.0 now supports use f the "id" keyword for mapping the joysticks. The Id corresponds to the event device associated with the device. For example, if event6 is listed as a handler for the device in /proc/bus/input/devices, then you can specify id=6 in the mapping file. If you specify the id, then you should not specify the vendor and product id.

      joymap-0.5.0 supports plugging in and out of devices, but if you use the id, then you may find a new event kernel device has been allocated to the physical device. But if you leave the devices plugged in (connected) then the mapping should work fine. Also the event devices allocated by the kernel across reboots may differ. That was why the vendor and product system was selected originally (it works great for HOTAS setups).

      Hope that helps!

      Kind regards
      Alexandre

       
<< < 1 .. 3 4 5 (Page 5 of 5)

Log in to post a comment.