Contents |
[edit] ZW Driver Alternative - How to create combos
Because ZWDA 0.9 doesn't include the combo wizard yet, this is a quick tutorial on how to create a combo. We will make the left middle button of the MX1000 minimize the current window, but adjust the volume when used with the wheel.
[edit] Affect a variable to the first button
First we need to affect a variable to the first button.
On its pressed event, affect the variable leftmiddlebutton to true.
On its unpressed event, destroy that variable.
That way the variable is only equal to true when the button is pressed.
[edit] Set the volume on the wheel event
On the wheel event, first test if leftmiddlebutton equals true. If yes, add the volume event.
To prevent windows or setpoint from generating a wheel event while we adjust our volume, we prevent the button from going to the next driver and we generate ourself the wheel event if needed.
[edit] Adding the minimize action and preventing the volume adjustment from triggering it
Just after the volume event, set the variable cancelleftbutton to true. This variable means "We adjusted the volume".
Then when we unpress the left middle button we checked if this variable is set to true. If not, this mean that pressing the button wasn't used in a combo and in that case we minimize the current window;

