Page 1 of 1

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

Posted: 11 Jan 2010, 01:57
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

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

Posted: 11 Jan 2010, 02:15
by Auswaschbar
increase max mouse button to 10, unhardcode 4 and 5 to buildspacing

Auswaschbar (author)
December 19, 2009

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

Posted: 11 Jan 2010, 02:16
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.

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

Posted: 11 Jan 2010, 11:55
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

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

Posted: 11 Jan 2010, 12:19
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).

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

Posted: 11 Jan 2010, 13:14
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.

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

Posted: 11 Jan 2010, 17:30
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

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

Posted: 11 Jan 2010, 19:46
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"?

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

Posted: 11 Jan 2010, 20:36
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