Binding custom code to joystick button

Hi,

I’d like to run some custom command if joystick button is pressed. I have implemented a MP plugin and checking how to access joystick button API. I see method “isButtonPressed” but it requires joystick button to be mapped to something in Joystick setup. Are there any other options?

Thanks,
Gediminas