JS for gamepad functionality?

So I bought these nasty VR controllers(elecom) which don’t work well with cospaces.
I was wondering if there was some JS I could plug in to bind the buttons on the controllers to functions in cospaces?

Either that or a wireless keyboard. Which seems like a better idea and so so obvious.

You can try to use

Input.onButtonPressed(() => {
    // Your code here
})

to check if the click event of the controller is processed by the system.
Read more information about Input namespace here https://cospaces.io/api/modules/input.html

1 Like

I tested the remote controller to see what the buttons were bound to and it says, key 304 - BUTTON_A key code 96 (for example), so I am wondering if I can plug that in and get it working. I don’t know JS.

Input.onButtonPressed((BUTTON_A) => {
// Your code here
})

It would be good if there were some JS examples to refer to, or a more detailed codeblock which let you define which key to bind things to.

left

Currently we do not have key_code support. But I will discuss that possibility with the developers

1 Like

Many thanks for your consideration.