The program 'jsbuttons' prints the state of joystick buttons as a decimal number to standard output.
It can be used to control the system where keyboard input is impossible/unwanted.
A (simple-to-build) four button pad can be used instead of a joystick.