joystick.AddButton(2,BUTTON_PASSTHRU);// this button will always transfer its current literal state to the computer
joystick.AddButton(3,BUTTON_LATCHED_MOMENTARY);// this button will start sending a buttonpress on one push, and keep it "held down" until it is pushed again.
joystick.AddButton(4,BUTTON_PULSED);// this button will send a buttonpress very briefly every time it is activated. Good for a toggle switch that shouldn't be "latched" in practice.
joystick.AddButton(5,BUTTON_PULSED_DOUBLE_ACTION);// like the above, but it sends its button press when toggled on *and* when toggled off
joystick.AddButton(6,BUTTON_PULSED_DOUBLE_ACTION_SPLIT);// again, similar to the above, but it sends two *different* button presses - 'on' will be one button, 'off' another.
joystick.AddEncoder(7,8,ENCODER_PULSED_SPLIT);// a rotary encoder that will send 2 different buttonpresses - one when the encoder is turned clockwise, another when it is turned counterclockwise.