Setup mouse look using joystick hat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsixpack1

    #1

    Setup mouse look using joystick hat

    Anyone interested in knowing how to do this. I have it setup using my Logitech extreme 3d pro, but should work on any joystick with a hat switch and software where you can assign keyboard keys to your jstick buttons.
    ----
    Ok I will type it up and post later today.
    ----
    As for inverting mouse look I think it can be done but haven't tried myself....

    You will need to modify the control.con file, which is located in your "My Documents" directory. Go to My Documents\Battlefield 2 \Profiles

    Open up Global.con

    Note which profile it's using (I Default, 0001 and 0002 and mine was set to 0002)

    Open up the Controls.con from that profile

    If you look at the top line for each subsection, it says Infantry, Land, Air, Helicopter, Sea, and Default.

    I added the following 2 lines to my control.con file in both ControlMap.create HelicopterPlayerInputControlMap
    and ControlMap.create AirPlayerInputControlMap sections

    (NOTE The following should be type all on one line)
    ControlMap.addKeysToAxisMapping c_PIMouseLookX IDFKeyboard IDKey_Y IDKey_U 0

    (NOTE The following should also be type all on one line) ControlMap.addKeysToAxisMapping c_PIMouseLookY IDFKeyboard IDKey_O IDKey_I 0

    Also for me this line was already there (again in both sections). Just check to make sure it exists:

    ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftShift 0 0

    Now for a few details...

    -The line that contains IDKey_Y IDKey_U 0 at the end means that you are mapping
    keys Y and U to the X axis of the mouse. (left-right I think)

    -The line that contains IDKey_O IDKey_I 0 means that you are mapping
    keys O(thats the letter O) and I to the X axis of the mouse. (up-down I think)

    -The line that contains IDFKeyboard IDKey_LeftShift 0 0, means that you are gonna use
    the left shift key to toggle mouse look.

    You can map whatever keys you want to these as long as they aren't used in other mappings under
    planes or helo's


    Next you need to map these keys to your joystick hat (keys Y,U,O and I) and another button (left shift) using the software that came with the joystick.
    I have the WingMan Extreme Digital 3d joystick and use Logitech's WingMan profiler to do this. However most joysticks
    come with software that allows you to map keys to you jstick button.

    So in my example, I would map keys Y and U to the left/right axis on the jstick hat, keys O and I to the up/down axis on the jstick hat and the left shift to a button on the joystick base.(I guess you can reverse this to invert the controls if you'd like)

    Then when I'm flying, all I need to do is press the button on the base (mapped to left shift) and move my joystick hat
    at the same time, and voila, mouselook on the joystick.

    Hope the instructions make sense.
  • Rooster

    #2
    Re: Setup mouse look using joystick hat

    Sure, I am interested. I believe I have the same joystick

    Comment

    • JohnnySpahn

      #3
      Re: Setup mouse look using joystick hat

      A related question: Is there a way to invert the mouse in Mouselook? Thanks.

      Comment

      • Harmor

        #4
        Re: Setup mouse look using joystick hat

        Originally posted by jsixpack1
        I added the following 2 lines to my control.con file in both ControlMap.create HelicopterPlayerInputControlMap
        and ControlMap.create AirPlayerInputControlMap sections

        (NOTE The following should be type all on one line)
        ControlMap.addKeysToAxisMapping c_PIMouseLookX IDFKeyboard IDKey_Y IDKey_U 0

        (NOTE The following should also be type all on one line)
        ControlMap.addKeysToAxisMapping c_PIMouseLookY IDFKeyboard IDKey_O IDKey_I 0
        Why map it to the keyboard and have to change your joystick? Just do this:

        Code:
        Find:
        
        ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftCtrl 0 0
        
        and replace with:
        
        ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftCtrl 0 0
        ControlMap.addButtonsToAxisMapping c_PIMouseLookX IDFGameController_0 IDButton_13 IDButton_15 0
        ControlMap.addButtonsToAxisMapping c_PIMouseLookY IDFGameController_0 IDButton_12 IDButton_14 0
        Notice here I have mapped 2 joystick buttons to an axis. The two buttons are the up/down and left/right of the HAT on my joystick.


        IDFGameController_0 is my system's 1st joystick controller.
        IDButton_12 is UP on my joystick's HAT (maybe different for your controller)
        IDButton_14 is DOWN on my joystick's HAT (maybe different for you controller)...etc...


        With the above you don't need to map Y O U I to your joystick's hat using special software.

        Comment

        • Talus
          Member
          • Oct 2006
          • 6854

          #5
          Re: Setup mouse look using joystick hat

          I use JoytoKey to do this. Works quite well.

          Comment

          • Harmor

            #6
            Re: Setup mouse look using joystick hat

            Originally posted by Talus
            I use JoytoKey to do this. Works quite well.
            What is JoytoKey? Is that a 3rd party program?

            Comment

            • Talus
              Member
              • Oct 2006
              • 6854

              #7
              Re: Setup mouse look using joystick hat

              Yeah, I've been using it for years.

              Here is an older version:


              it is up to version 3.7.9 but finding the english version can be tricky

              Comment

              • wookinpanub

                #8
                Re: Setup mouse look using joystick hat

                Originally posted by Harmor
                Why map it to the keyboard and have to change your joystick? Just do this:

                Code:
                Find:
                
                ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftCtrl 0 0
                
                and replace with:
                
                ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftCtrl 0 0
                ControlMap.addButtonsToAxisMapping c_PIMouseLookX IDFGameController_0 IDButton_13 IDButton_15 0
                ControlMap.addButtonsToAxisMapping c_PIMouseLookY IDFGameController_0 IDButton_12 IDButton_14 0
                Notice here I have mapped 2 joystick buttons to an axis. The two buttons are the up/down and left/right of the HAT on my joystick.


                IDFGameController_0 is my system's 1st joystick controller.
                IDButton_12 is UP on my joystick's HAT (maybe different for your controller)
                IDButton_14 is DOWN on my joystick's HAT (maybe different for you controller)...etc...


                With the above you don't need to map Y O U I to your joystick's hat using special software.

                Wow.... AMAZING difference in visibility for tracking in dogfights. Kudos to both (i used the method above btw) for posting the details!

                Comment

                • Talus
                  Member
                  • Oct 2006
                  • 6854

                  #9
                  Re: Setup mouse look using joystick hat

                  I should also add that with JoyToKey, I only have to move the hatswitch for mouse looking..I don't have to hold down any other key or joystick button. I basically achieve the effect that should have originally been included.

                  That is what makes my method so sweet

                  EDIT: Well, it looks like the english page no longer works


                  If anybody wants a copy, I just uploaded it here: (just click on the FREE button to download)


                  I have included the 2 config files I use with my MS Sidewinder Precision 2 to achieve the one-motion mouselook. You can check them out to see how I did it, or you can ask here and I can help. All you have to do is load 2 instances of JoyToKey and set each instance to use one of the 2 configs so that both configs are running simultaneously.

                  You'll also notice that I have it set up so that you can use the Commo rose and voice communication while flying Nice added bonus

                  Hold down button 5 to: use the hatswitch to change camera views and change jet weapon loadouts, button 6 to eject, and button 7 to voip chat with squad.

                  Hold down button 8 to: use the hatswitch for the commo rose, button 1 (trigger) to select the command.

                  Comment

                  • Harmor

                    #10
                    Re: Setup mouse look using joystick hat

                    Originally posted by Talus
                    I should also add that with JoyToKey, I only have to move the hatswitch for mouse looking..I don't have to hold down any other key or joystick button. I basically achieve the effect that should have originally been included.
                    AWESOME. Eventhough I have it working without your program, I still have to press a key to get into the mouselook (Left Ctrl by default), with the HAT.

                    You'll also notice that I have it set up so that you can use the Commo rose and voice communication while flying Nice added bonus
                    I too wish I could use the Commo rosewhile flying. I have my left hand on the keyboard so I can press the 'Q' and 'T', but can't click the mouse.

                    Comment

                    • Talus
                      Member
                      • Oct 2006
                      • 6854

                      #11
                      Re: Setup mouse look using joystick hat

                      I'd recommend you give JoyToKey a try then!

                      One touch mouselooking + ability to communicate while flying = awesome!

                      Comment

                      • socko7

                        #12
                        Re: Setup mouse look using joystick hat

                        tasul,what do you mean when you say"load two instances"?..I'm sorry i'm a little thick sometimes...lol

                        Comment

                        • Talus
                          Member
                          • Oct 2006
                          • 6854

                          #13
                          Re: Setup mouse look using joystick hat

                          I mean, run the program TWICE.

                          So you'll have 2 program icons running in the tray. The program is loaded twice and both 'instances' are running.

                          Right-click one icon and select one of the configs, then right-click the other icon and select the other config.

                          The program is designed to be run in multiple 'instances' this way to achieve these complex sort of key/mouse combinations that would not be possible otherwise.

                          Comment

                          • socko7

                            #14
                            Re: Setup mouse look using joystick hat

                            thanks,I appreciate the help.

                            Comment

                            • Talus
                              Member
                              • Oct 2006
                              • 6854

                              #15
                              Re: Setup mouse look using joystick hat

                              No problem. If you need anything else, just PM me. I think I've hijacked this thread enough

                              Comment

                              Working...