Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Black Jack on September 09, 2007, 12:42:04 pm

Title: Mouse Button problem and feature request
Post by: Black Jack on September 09, 2007, 12:42:04 pm
I'm using a mouse with 4 Buttons (left, right, wheel/middle, thumb), which makes 6 buttons under linux.
Unfortunately FreeSpace recognizes both the left and right button as button1 and the middle and thumb button as button2, completely ignoring the mouse wheel. So effectively I'm stuck with a two-button-mouse. Under linux all the buttons are recognized and mapped, other apps and games also use them properly, so I don't think it's a system issue. The original game (under windows) also recognized all buttons. Does anyone have a hint what to do to activate all or at least more of the buttons?

In addition, is there any possibility that the FreeSpace options menu get at switch if the mouse y-axis shall be inverted or not?
I don't think it wouldn't be too hard to implement and greatly eases the transition between FreeSpace and other games ...

Greetings
Black Jack
Title: Re: Mouse Button problem and feature request
Post by: jr2 on September 09, 2007, 12:57:24 pm
Mouse Invert: F2 -> Control Configuration -> Ship

Invert option is on the bottom:

(http://i12.tinypic.com/4ygpsva.jpg)

As far as multi-buttons go, there was a script that fixed that, IIRC... ask Nuke.  Oh, and
:welcomeblue:
Title: Re: Mouse Button problem and feature request
Post by: taylor on September 09, 2007, 01:22:31 pm
You are limited to what SDL supports, which at this time is limited to: left, right, middle/wheel.  The code doesn't support the wheel yet, but I have already coded in support for it as part of the pilot file upgrade (since adding new controls breaks pilot files).

There should be no reason for it to mess up your buttons like that though.  Try creating a new pilot file and see if perhaps it's corruption that messed it up.
Title: Re: Mouse Button problem and feature request
Post by: castor on September 09, 2007, 03:30:28 pm
You may also need to remap the mouse button codes for sensible operation.
For example, this is what I use to map the "thumb button" as the "middle button":
Code: [Select]
xmodmap -e "pointer = 1 6 3 4 5 7 8 2 9 10"
..swapping the button codes 2&6.

With my current X, SDL etc. versions that seems to be enough, but Its not so long ago when I had to use quite obscure remap strings to make it work at all..
One hint, if you end up remapping stuff, the "xev" command line tool is your friend :)

Title: Re: Mouse Button problem and feature request
Post by: Black Jack on September 09, 2007, 07:32:19 pm
Thanks, I'll try your advices.
But now it's time for bed ... :-)