The joystick just looks like a USB keyboard mapped to the cursor keys and Enter.
Try using it to navigate the Linux terminal history!
So all you need to do is look for those same keyboard events.
You should have an example file which demonstrates it.
Code: Select all
cd ~/astro-pi-hat/examples
./pygame_joystick.py
Code is also online here.
https://github.com/astro-pi/astro-pi-ha ... oystick.py