Capturing game controller button events in Processing for Android

Hi Sir
Maybe I am far about your topic
But Easy way to do it

1- If the controller connect via Bluetooth I think it’s easy to capture the key’s code as array and use it in sketch

2-You can read Bluetooth key code if you want using Serial Bluetooth Terminal App for Android

3 -for USB I found one library support USB for Android make connection with Arduino (not all kinds of Arduino) I don’t know if it’s support game controller

Here is example to receive Bluetooth