Skip to content
A simple Java interface to PPJoy.
Java
Find file
Failed to load latest commit information.
lib First release
nbproject version 1.0
src/org/flypad Public Release 1.1.0: Fixed: Could send data only once
.gitignore First release
README.markdown version 1.0
build.xml First release
manifest.mf First release

README.markdown

FlypadJoystick is a Java wrapper for PPJoy. In other words, it enables you to control PPJoy's virtual joystick directly from Java.

Here goes a simple example.

    try {
        /*
         * Try to create a new joystick.
         */
        Joystick joystick = new Joystick();

        try {
            /*
             * Set joystick values
             */

            /*
             * Set analog values for Axis X/Y/Z,
             * Rotation X/Y/Z, Slider, Dial. Overall 8 axes.
             * 
             * Here we set the Z Axis to maximum.
             */
            joystick.analog[Joystick.ANALOG_AXIS_Z] = Joystick.ANALOG_MAX;

            /*
             * Set digital values for the buttons. Overall 16 buttons.
             *
             * Here we turn on the 13-th button
             */
            joystick.digital[12] = Joystick.DIGITAL_ON;

            /*
             * Send the data to the joystick. Keep in mind,
             * that the send method may throw a JoystickException
             */
            joystick.send();
        } finally {
            joystick.close();
        }
    } catch (JoystickException e) {
        e.printStackTrace();
    }

FlypadJoystick is licensed under the Apache 2.0 license. FlypadJoystick relies on JNA for native access. Note that one needs PPJoy installed before using FlypadJoystick.

Something went wrong with that request. Please try again.