KEY_STATE JoyButtonState(uint joystickId, J_KEY key)/ETHInput

Returns the state of a joystick button in the given joystickId.

ETHInput@ input = GetInputHandle();

// if player one hit joystick button #8
if (input.JoyButtonState(0, JK_08) == KS_HIT)
{
    print("Player 1 hit button 8!");
}

// if player released left button
if (input.JoyButtonState(1, JK_LEFT) == KS_RELEASE)
{
    print("Player 2 released left button!");
}