Macro systeem veralgemeniseerd naar Sequence. Sequence maakt het mogelijk om de automatische toegevoegde events bij macro's te omzeilen. Hier wordt gebruik van gemaakt bij de Continuous task, want deze moet alle vrijheid hebben. Nu is in de vele shortcut-sequence add functies nog geen beveiliging om oneindige Continuous tasks uit te voeren. De verantwoordelijkheid hiervoor ligt bij de gebruiker of een toekomstige controle.

This commit is contained in:
2011-02-13 13:08:55 +00:00
parent d62a354d9a
commit 3805baf986
10 changed files with 86 additions and 53 deletions

View File

@@ -37,10 +37,12 @@ public class RumblepadDevice extends JavaInputDevice {
new Task(Action.PREVIOUS, Target.APPLICATION));
add(
new Hold(RumblepadButton.FIVE),
new Continuous(Action.FORWARD, Target.APPLICATION, 300));
new Continuous(Action.FORWARD, Target.APPLICATION, 200){
public int getSleep() {return sleep - 30 * iteration;}});
add(
new Hold(RumblepadButton.SEVEN),
new Continuous(Action.REWIND, Target.APPLICATION, 300));
new Continuous(Action.REWIND, Target.APPLICATION, 200){
public int getSleep() {return sleep - 30 * iteration;}});
add(
new Hold(RumblepadButton.NINE),
new Continuous(Action.VOLUME_DOWN, Target.APPLICATION, 100));