Does KX_INPUT work on joysticks?

Just wanted to know if KX_INPUT works on joysticks. If I use KX_INPUT_ACTIVE or KX_INPUT_NONE in conjunction with a joystick, would that work with Python, since a joystick is a controller. Or is it only with computer keyboards?

No AFAIK.
Had to create an artificial “Just_Activated”-logic with a timer for the Joy-Buttons for example.

If anybody knows a better way please tell.

For checking joystick activity status you can check the length and values of the lists for active buttons or axes:
https://upbge.org/docs/latest/api/bge.types.SCA_PythonJoystick.html#bge.types.SCA_PythonJoystick

With a Joystick-sensor it is easier.


03_Joystick-Button-status.blend (814.3 KB)

docs:
https://bgepython.tutorialsforblender3d.com/Sensor/LogicBrick/status
https://upbge.org/docs/latest/api/bge.types.SCA_JoystickSensor.html#bge.types.SCA_JoystickSensor.getButtonStatus

Here is the Python only solution: