iTunes verder geimplementeerd en de eightfold switch renamed. Het lijkt er nu op dat play en pause bijvoorbeeld twee keer worden uitgevoerd als je één keer een knop indrukt. Misschien moeten dit macro's worden waarin ook om een release gevraagd wordt.

Met doorspoelen of terugspoelen, hoe maak je het mogelijk dat er gespoeld wordt totdat je de knop loslaat? Daar moet over nagedacht worden.
This commit is contained in:
Bram Veenboer
2011-02-10 18:11:10 +00:00
parent 903907ce4d
commit 71e21d6dee
6 changed files with 105 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ import pm.Action;
import pm.Button;
import pm.Macro;
import pm.Target;
import pm.device.javainput.EightfoldDirection;
import pm.device.javainput.DirectionalSwitch;
import pm.device.javainput.JavaInputDevice;
import pm.exception.DeviceException;
import pm.exception.MacroException;
@@ -35,10 +35,23 @@ public class RumblepadDevice extends JavaInputDevice {
new Press(RumblepadButton.THREE),
Action.RESUME.setTarget(Target.APPLICATION));
add(
new Macro(
new Press(RumblepadButton.NINE)
),
Action.EXIT.setTarget(Target.MAIN));
new Press(RumblepadButton.SIX),
Action.NEXT.setTarget(Target.APPLICATION));
add(
new Press(RumblepadButton.EIGHT),
Action.PREVIOUS.setTarget(Target.APPLICATION));
add(
new Press(RumblepadButton.FIVE),
Action.FORWARD.setTarget(Target.APPLICATION));
add(
new Press(RumblepadButton.SEVEN),
Action.REWIND.setTarget(Target.APPLICATION));
add(
new Press(RumblepadButton.NINE),
Action.VULUME_DOWN.setTarget(Target.APPLICATION));
add(
new Press(RumblepadButton.TEN),
Action.VOLUME_UP.setTarget(Target.APPLICATION));
} catch (MacroException e) {
e.printStackTrace();
}
@@ -49,6 +62,6 @@ public class RumblepadDevice extends JavaInputDevice {
}
protected Button getButton(JXInputDirectionalEvent event) throws UnknownDirectionException {
return EightfoldDirection.create(event);
return DirectionalSwitch.create(event);
}
}