Pi Zero HyperPixel Safe Shutdown

Hello. I have a momentary switch and would like to create a safe shutdown for Pi which is attached to the HyperPixel display (uses all 40 pins).

I’m following the instructions from Magpi on how to do this, problem is it requires access to Pin 40 and Pin 39. Any ideas to get this done?

Not going to work unfortunately. The Hyperpixel actually uses all the pins and reconfigures them for its use.
Hyperpixel at Raspberry Pi GPIO Pinout

You will end up with a conflict trying to use GPIO 21 for a shutdown function.

I appreciate the response.