Suspend kodi directly by press of power button (chassis , not remote)

I found a million instructions on how-to and finally managed to make kodi suspend immediately (that is without popping up and stepping through the shutdown menu) after I pressed the power button on my remote.

However, I’d like to have the same behavior when pressing the power button on my PC/chassis. Currently it only makes the shutdown menu appear, which is not very handy when you don’t have your remote at reach. I didn’t find any guidance on how to achieve this and assume it is probably a bit more komplex than just editing a keymap.xml file.

My system is running Ubuntu desktop 16.04. LTS. Any hints are welcome.