adafruit / Adafruit-Retrogame

Raspberry Pi GPIO-to-virtual-keyboard utility for classic game emulators
https://learn.adafruit.com/retro-gaming-with-raspberry-pi
355 stars 123 forks source link

Diagonal Directions for Analog Joy Stick on the Joy Bonnet #67

Open joshuareedbarney opened 4 years ago

joshuareedbarney commented 4 years ago

By default, the changes reflected in this pull request should not change behavior of the Joy Bonnet at all. Only by changing the ENABLE_DIAGONAL_DIRECTIONS flag to True can a user enable separate key presses for the diagonal directions on the joy stick. If this is done, then of course they can customize the four additional key presses in the KEYS dictionary (1004-1007). I tried to search for some code online that would enable me to use the diagonal directions as separate key presses on the Joy Bonnet, but I could not find any, so I just made the code change myself.