Hi,
I am not sure I am too late for the next Airmanager for Desktop release with this.
Maybe I overlook something. I cannot find a way to change the direction of the mouse wheel for switches. For example:
if I have a three-position switch and I rotate the mouse wheel, the switch callback sends +1 when turning the wheel down and -1 when turning the wheel up. How can I change that?
I tried:
mouse_setting(switch_id , "CLICK_ROTATE", -1)
to no effect.
Is the mouse_setting() function only for dials or can I use it to set the mouse behavior for multi position switches also? If not, it could be added as feature in the next release?!
Thank you
Detlef
Mouse wheel direction for switches
Re: Mouse wheel direction for switches
Direction times -1?
Re: Mouse wheel direction for switches
Then I don't know what you mean...
Re: Mouse wheel direction for switches
Hi Detlef, he means that for each event you multiply the value returned by -1 so if the return is -1 then the result of -1 * -1 is a positive meaning 1, and if the value is 1, then multiplying by -1 will produce a negative meaning -1 in this case - hence reversing the sign of the values.
Regards
Joe
Joe. CISSP, MSc.
Re: Mouse wheel direction for switches
Hello Joe and @Ralph,jph wrote: ↑Mon Jan 08, 2024 6:46 amHi Detlef, he means that for each event you multiply the value returned by -1 so if the return is -1 then the result of -1 * -1 is a positive meaning 1, and if the value is 1, then multiplying by -1 will produce a negative meaning -1 in this case - hence reversing the sign of the values.
Regards
Joe
I understand you but you don't understand me
It is sometimes unbelievably complex to put simple things in words. So I figured it out now.
I (actually a friend of mine) wanted to use the position value from the switch callback function in an fs2020_variable_subsribe() directly as is.
The solution is, you put the pictures in reverse order in the switch_add() call and you do not use position but "2 minus position" in the fs2020_variable_subsribe() call.
Sounds simple but is some brain acrobatics. I thought a parameter in the switch_add() function could be used to the Airmanager functions to reverse the mouse wheel direction.
See my demo instrument Thanks
Detlef
-
- Posts: 5676
- Joined: Thu Jul 27, 2017 12:22 am
Re: Mouse wheel direction for switches
Hi @Detlef, already made similar, though shouldn't be made through the call or subscription, but rather be handled in the callback function in any case ...
[EDITED]
[EDITED]