When the mouse wheel scrolling stops, mod-up is never executed until before the main binding when it is scrolled again. The problem happens separately for the two corresponding "buttons".
Reproduction.
<input> of ufo-set.xml<mice>
<mouse n="0">
<mode n="1">
<button n="3">
<binding>
<command>nasal</command>
<script>
print("+ 1");
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
print("+ 0");
</script>
</binding>
</mod-up>
</button>
<button n="4">
<binding>
<command>nasal</command>
<script>
print("- 1");
</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
print("- 0");
</script>
</binding>
</mod-up>
</button>
</mode>
</mouse>
</mice>
+ 1 and + 0 printed when wheel is rolled up and stopped, and the same with - when rolled down and stopped.+ 1 or - 1 as expected, but there is never a 0. All subsequent scrolls will have 0 before the new 1.
This makes sense becuase there is no release event for wheel events. I.e it's not really a button. We could fake the mod-up with a timeout of maybe 500 msec? (or similar....) but I think that's the best which is possible.
Indeed, I didn't think of that!
Yes, imho it would make sense to make something that
Can you send an email to the developer list propsiing this and see if anyone had feedback? Especially on if making this change would negatively impact anything? (I can't imagine how, but...)
It seems that have been no replies on the ML. I think it would be ok to change the behaviour.
Agreed, do you want to propose a patch?
It looks like this one is beyond my skills. I can try but can't promise anything.
That's okay, I can do it, just quite busy so takes some time.
I believe the place to insert it would be flightgear/src/Input/FGMouseInput.cxx?
No problem, take your time ^^