App switching support
Note: Also contains a fixed version of #157. Should probably reach a resolution on that before this one.
This pull request allows for one to switch multiple applications in one go by setting Alt+Tab OnInterval in one direction, and Alt+Shift+Tab OnInterval in the other direction. Fixes #35. It also addresses some related issues that I encountered (fixes #118 and fixes #128).
These changes will break any use case that requires being able to do gestures on multiple axes during one gesture button press. I can't think of any use cases that need that functionality, though.
Changes:
- GestureAction: Restrict movements to a single axis after threshold is reached (issue #35, useful for preventing unintended gesture activations)
- GestureAction: Don't wait till origin before switching directions (issue #128, useful when both directions affect the same state like changing volume or switching workspaces)
- IntervalGesture: Fire action as soon as threshold is reached, instead of waiting for another interval (issue #128)
- Added halfRelease method from IntervalGesture to Action to KeypressAction (issue #118, useful when the OnInterval actions for an axis require holding a key down, like Alt+Tab and Alt+Shift+Tab)
Sample config for application switching:
devices: (
{
name: "M720 Triathlon Multi-Device Mouse";
buttons: (
{
cid: 0xd0;
action = {
type: "Gestures";
gestures: (
{
direction: "Left";
mode: "OnInterval";
interval: 150;
action = {
type: "Keypress";
keys: ["KEY_LEFTALT", "KEY_LEFTSHIFT", "KEY_TAB"];
};
},
{
direction: "Right";
mode: "OnInterval";
interval: 150;
action = {
type: "Keypress";
keys: ["KEY_LEFTALT", "KEY_TAB"];
};
}
);
};
}
);
}
);
Running @abraha2d 's branch to try and sort smooth volume operations on thumb button. Can confirm fixes for #128 greatly improve usability for volume operations.
Just locally rebased this branch in to master and can confirm everything still works perfectly and it still fixes multiple issues, would definitely like to see this branch merged @PixlOne