Jump to content

Mouse Wheel Binding


14 replies to this topic

#1 Pslyde

    Rookie

  • 4 posts

Posted 31 December 2012 - 07:39 PM

I know how to bind mwheel_up and mwheel_down, but has anybody figured out a binding for left tilt and right tilt? I tried mwheel_left and mwheel_right. It didn't work.

Spoiler: my current actionmap
Spoiler

Edited by Pslyde, 31 December 2012 - 07:52 PM.


#2 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 01 January 2013 - 06:31 AM

Oh really wheel up and down is actually hackable? Nice one, I didn't think to try editing files.
Scroll left and right is actually a standard windows button (ie not unique to logitech) but I have yet to see a game recognise it in control binding options.

What kind of mouse do you have? If it is logitech, you should be able to program it using your logitech software.

If not, try this AutoHotkey macro - it sets wheel left to thermal view, right to night vision:
http://evilc.com/fil...o/wheeltilt.ahk

Note that this does not work for me, I seem to remember if I uninstall my logitech drivers, it does work - so if you just use a generic mouse, it may work. Be aware though, by default AutoHotkey macros will not fire weapons - only sundry controls such as zoom and vision mode will trigger the ingame action. To make AHK fire weapons, you must add a 50ms delay between the key down and the key up.

Another thing to try is XMouse, though again you may want to uninstall any mouse drivers you may have installed to get this to work properly.

Edited by evilC, 01 January 2013 - 07:11 AM.


#3 Wildedge

    Member

  • PipPip
  • 44 posts

Posted 01 January 2013 - 01:49 PM

I pasted this into my actionmap.xml and then set the file to read only. I have not been able to use zoom with my mouse wheel. Can anyone tell me what I'm doing wrong?

<ActionMaps Version="10">
<actionmap name="hud">
<action name="m_toggle_zoom_mode">
<rebind device="keyboard" input="mwheel_up" index="2" defaultInput="mouse3"/>
</action>
<action name="toggle_Weapon_Group">
<rebind device="joystick" input="" index="1" defaultInput="j0_button4"/>
</action>
</actionmap>
<actionmap name="mech">
<action name="m_toggle_night_vision">
<rebind device="joystick" input="j0_button6" index="1" defaultInput="j1_pov1_left"/>
</action>

#4 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 01 January 2013 - 02:19 PM

To bind mouse to zoom I use a AHK macro:
http://evilc.com/files/ahk/mwo/zoom.ahk

Binds zoom in to wheel up and PIP zoom module to wheel down.

Edited by evilC, 01 January 2013 - 02:20 PM.


#5 Pslyde

    Rookie

  • 4 posts

Posted 02 January 2013 - 05:19 PM

View PostevilC, on 01 January 2013 - 02:19 PM, said:

To bind mouse to zoom I use a AHK macro:
http://evilc.com/files/ahk/mwo/zoom.ahk

Binds zoom in to wheel up and PIP zoom module to wheel down.

Link text is correct, link itself is broken.
http://evilc.com/fil...hk/mwo/zoom.ahk

I've used XMouse before, but it has always been a little buggy for me. And I can't get it to play nice with MWO.

AHK is awesome! Thanks. I've heard of it, but for some reason it didn't stick in my head. Probably a cleaner solution than tinkering with game files.
edit: Seems I can't get AHK to play nice with MWO either. I guess that's what I get for using a cheap mouse. It fits my hand and works great, so I guess I'll just have to either deal with no tilt or pony up for a better mouse.

Edited by Pslyde, 02 January 2013 - 05:54 PM.


#6 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 03 January 2013 - 04:34 AM

View PostPslyde, on 02 January 2013 - 05:19 PM, said:

Link text is correct, link itself is broken.
http://evilc.com/fil...hk/mwo/zoom.ahk


edit: Seems I can't get AHK to play nice with MWO either. I guess that's what I get for using a cheap mouse. It fits my hand and works great, so I guess I'll just have to either deal with no tilt or pony up for a better mouse.

Thanks for the correction!
So what do you mean by "I can't get AHK to play nice with MWO"? My zoom script does not work?
If so, what happens if you replace
 
		Send {z}
 

with
 
			Send {z down}
			Sleep, 50
			Send {z up}
 

Edited by evilC, 03 January 2013 - 04:36 AM.


#7 Snib

    Member

  • PipPipPipPipPipPipPip
  • 689 posts

Posted 03 January 2013 - 06:05 AM

View PostWildedge, on 01 January 2013 - 01:49 PM, said:

I pasted this into my actionmap.xml and then set the file to read only. I have not been able to use zoom with my mouse wheel. Can anyone tell me what I'm doing wrong?

yeah, you put it in the wrong place, those commands belong to the <actionmap name="mech"> section, so paste it below that line. Also no reason to set the file to read only.

#8 vettie

    Member

  • PipPipPipPipPipPipPipPip
  • The Machete
  • The Machete
  • 1,620 posts
  • LocationThe Good Ole South

Posted 06 January 2013 - 07:41 AM

interesting stuff

SO if I wanted to use the mouse center scroll for throttle up and throttle down (reverse), any idea how I would do that?
I use a Logitech MX518 wired mouse.

#9 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 January 2013 - 01:21 PM

View Postvettie, on 06 January 2013 - 07:41 AM, said:

interesting stuff

SO if I wanted to use the mouse center scroll for throttle up and throttle down (reverse), any idea how I would do that?
I use a Logitech MX518 wired mouse.

WheelUp::Send {w}
WheelDown::Send {s}
MButton::Send {x}

Wheel is speed, click wheel is stop

Edited by evilC, 06 January 2013 - 01:21 PM.


#10 Flocus

    Member

  • PipPip
  • The Marauder
  • The Marauder
  • 35 posts
  • LocationGermany

Posted 20 January 2013 - 05:27 AM

Here is a similar or maybe just updated solution to configure the mousewheel. IMHO this is the most elegant way as no macro or any other third party software is involved. Just edit the the actionmaps XML found in:

<MWO location>/USER/Profiles/<player name>/actionmap.xml
<ActionMaps Version="10">
<actionmap name="mech">
  <action name="m_toggle_zoom_mode">
   <rebind device="keyboard" input="mwheel_up" index="2" defaultInput="mouse3"/>
  </action>
</actionmap>
</ActionMaps>

Please note, that I removed some <action> entries for clarity. The part input="mwheel_up" is the important change.

This works pretty fine for me, you can see it even in the MWO options dialogue.

#11 bex76

    Rookie

  • 2 posts
  • LocationGermany

Posted 20 January 2013 - 05:58 AM

Works flawless for me, thanks :)

#12 HeavyRain

    Member

  • PipPipPipPipPipPip
  • 281 posts
  • LocationAthens, Greece

Posted 14 February 2013 - 11:36 AM

View PostevilC, on 06 January 2013 - 01:21 PM, said:

WheelUp::Send {w}
WheelDown::Send {s}
MButton::Send {x}

Wheel is speed, click wheel is stop



I 've tried running this script and it works fine in all my other windows, apart from in-game ;)
It even works on the in-game menus, I mean when i activate it i can see that scrolling is disabled, as it should.
However, when the game starts, the scrollwheel does nothing, neither does the click wheel. Any ideas?

#13 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 14 February 2013 - 12:05 PM

View PostHeavyRain, on 14 February 2013 - 11:36 AM, said:



I 've tried running this script and it works fine in all my other windows, apart from in-game ;)
It even works on the in-game menus, I mean when i activate it i can see that scrolling is disabled, as it should.
However, when the game starts, the scrollwheel does nothing, neither does the click wheel. Any ideas?

Try adding this at the start of the script:
SetKeyDelay, 0, 50


Failing that, try this:
Wheelup::
Send {w down}
Sleep, 50
Send {w up}
return

Do either of those fix it?

#14 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 14 February 2013 - 12:09 PM

Oh, and another possibility is to try my virtual axis throttle. See this post.
There is a post a little lower down in the thread on how to make that script use the mouse wheel.

This will also give you the benefit of half speed, full speed and full reverse hotkeys.

#15 HeavyRain

    Member

  • PipPipPipPipPipPip
  • 281 posts
  • LocationAthens, Greece

Posted 14 February 2013 - 12:55 PM

View PostevilC, on 14 February 2013 - 12:05 PM, said:

Try adding this at the start of the script:
SetKeyDelay, 0, 50




This works fine, thanks a lot for your help!

I will also try the things in your following post for extra options.
Again, many thanks.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users