PiCade key bindings for MIT Scratch

Hi All - Sorry, Newbie here.
I’m trying to create a game platform for my Scratch students using Raspberry Pi 4 and Scratch.
(Scratch is a block based programming language - see https://scratch.mit.edu/)
It has a stand alone version (desktop) for the Raspberry Pi.

Here’s the issue -
A built in limitation of Scratch is that it can only address certain keyboard characters:
Space
Up Arrow
Down Arrow
Left Arrow
Right Arrow
A thru Z
1 thru 9

I need to map those keys to the joystick and the six buttons.
The other cabinet buttons would also be useful for game design/play, but I’m hoping that the volume keys (if that’s a thing?) would pass through to the system.

I hear that the Picade Hat is actually an Arduino?
I have some experience with them too…

Trying to piece together the clues here .

Scratch and PiCade would make a great combo for teaching game design. The hope is that deploying their games to the PiCade (from desktop) would be the culminating activity for the class - the student body would get to try out the games, and vote for the best one…

Thanks for any help here - the wisdom is in the crowd!

BW

The Picade “Hat” pinout is here.
Picade X HAT at Raspberry Pi GPIO Pinout
For the most part it just connects the buttons and joystick to pins on the Pi’s GPIO.
It does have a DAC on it for i2s sound, but its not (near as I can tell) Arduino like.

The Player X on the other hand does it all via USB and shows up as a USB HID device.
Player X USB Games Controller PCB - Pimoroni
I imagine there is some form of Micro Controller onboard. I have no idea what one or if you can access it though?

Thanks!
I think the answer resides somewhere in something like this - however, I’m not sure this is current and it refers to loading a legacy driver…