Everything is done differently on a Mac. The power button is a normal button which generates some scancodes. Even the Fn button is normal on a Mac, whereas its not visible to the OS on a PC, which is why you often have no way to remap the Fn button except swapping it with Ctrl. In PCs the power button connects with the power supply instead.
In PCs with AT power supplies it's a hard switch button which disconnects the PC from the power source when turning off (which is why the It's now safe to turn off your computer message exists). So the OS doesn't even have a chance to know that the button was pressed before it dies, and you can't capture the button
In PCs with ATX power supplies the button connects with the power supply and not with a keyboard controller, so you don't get a scancode and can't use it in a combo key. You can capture the shutdown event though, although with some caveats in modern Windows versions. It'll be significantly slower than a normal key press, and probably not suitable for typing or sending shortcuts but may be OK for your use-case
- Run a program on: hard “Power” button press
- Hook system power button in Windows
- Can the power button of a PC or laptop be remapped?
- Change Behavior of Linux Power Button
- How can I Execute a Function when Windows Shut down
- Hook system power button in Windows
- How to detect power button event and deny it on windows 7 from laptop
So you can set the power button to sleep, and run a command to restart on sleep event, or capture the power button directly and restart.
But if you just want to force a hard reset then it's much simpler to hold down power button for a few seconds to force shutdown, then start it again.
It's a bit easier if you want to start the PC, since most desktop BIOSes allow you to wake up or start the computer from off state by pressing a key or key combination on the mouse/keyboard, probably because in many situations the CPU case is put in somewhere not reachable by the user. But I've never seen a laptop with that feature, and no laptop BIOS allows you to press both a key on keyboard and power key too, since you always have easy access to the laptop's power button.