Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Requests for features in the spring code.

Moderator: Moderators

Post Reply
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by R-TEAM »

Hi,

as the Topic say ... i like the option to use the 4th or/and 5th
mouse button like the middlemouse button.
Have no problem with the MiddleButton, but my new mouse have
a very strong middle button and so i wish i can use the 4th or/and
5th button ...

Regards
R-TEAM
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by Auswaschbar »

increase max mouse button to 10, unhardcode 4 and 5 to buildspacing

Auswaschbar (author)
December 19, 2009
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by MidKnight »

...so you can edit your uikeys.txt to achieve this.

Either that, or the feature will be in the next version of Spring.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by R-TEAM »

Hi,
Auswaschbar wrote:
increase max mouse button to 10, unhardcode 4 and 5 to buildspacing

Auswaschbar (author)
December 19, 2009
NICE ;)
and - it is now available and who i use it ?
Have already in UIKeys ->
Bind mouse3 mouse2
But doing nothing .....

Regards
R-TEAM
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by hoijui »

as this change is form dec 19. which was after the last release of spring (0.80.5.2) you have to wait for the next version.
and when that comes, you will be able to bind either button 4 or 5 to something, eg what happens wiht middle mouse button. the middle mouse button is still hardcoded to the same stuff (if i get it right), so it will still do the smae stuff (same for mouse2, i guess).
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by Auswaschbar »

Code: Select all

function widget:GetInfo()
   return {
      name      = "MouseAction",
      desc      = "^^^^^^^^^^^",
      author    = "Auswaschbar",
      version   = "v1.0",
      date      = "Dec, 2009",
      license   = "GNU GPL, v3 or later",
      layer     = 9000,
      enabled   = true,
   }
end
   
function widget:MousePress(mx, my, button)
   local alt,ctrl,meta,shift = Spring.GetModKeyState()
   -- Spring.Echo("Button pressed: " .. button)
   if (button == 8) then
      Spring.SetActiveCommand("selfd")
      -- Spring.SendCommands("drawlabel")
      return true
   end
   return false
end  
You can use mouse buttons liek this.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by R-TEAM »

Hi,
hoijui wrote:as this change is form dec 19. which was after the last release of spring (0.80.5.2) you have to wait for the next version.
and when that comes, you will be able to bind either button 4 or 5 to something, eg what happens wiht middle mouse button. the middle mouse button is still hardcoded to the same stuff (if i get it right), so it will still do the smae stuff (same for mouse2, i guess).
ähhmm -- I use regulary the nightly builds ;)
(ATM 0.80.5-377)
So it is ATM not in the builds imho ...
And i have no problem if the middle mouse still at the same funktions :)

Regards
R-TEAM
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by lurker »

R-TEAM wrote:So it is ATM not in the builds imho ...
Your opinion is factually incorrect. Have you tried the standard keybind format of "bind button action" instead of this "bind button button"?
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Map the MiddleMouse to the 4th. or/and 5th Mouse Button..

Post by R-TEAM »

Hi,
lurker wrote:
R-TEAM wrote:So it is ATM not in the builds imho ...
Your opinion is factually incorrect. Have you tried the standard keybind format of "bind button action" instead of this "bind button button"?
mmhh ... have not found the "action" name for mouse2...
even in UIKeys , the binding for "j" is only "button > button".
And it works for my ATM workaround (the ZERO button on Numpad):
bind 0x100 mouse2
(but this is only a ugly workaround ... ;) )

Regards
R-TEAM
Post Reply

Return to “Feature Requests”