Power button on Argon One M.2 case

Hello everyone, is there a way to make the power button on the Argon One M.2 case power the whole OSMC system off gracefully (without needing to select power off through the UI)? I’ve run the script from https://www.argon40.com/learn/index.php/2020/03/10/argon-one-installation-guide-for-osmc/ but I don’t know if it’s properly compatible with the 2021.08-1 OSMC release for Raspberry Pi 4, and it doesn’t seem to make this button work for powering off. Pressing the button to turn the system on from the off state works OK, of course.

It’s probably best to contact them as we don’t have this hardware to test with locally.

Thanks! I’ll do that. Assuming I can find where to add a suitable command in the Argon One script, that would be triggered on pressing the power button, is it still safe simply to run “shutdown -h now” as described at How to turn on/off OSMC - #4 by sam_nazarko (i.e. no other command is needed first to make sure everything shuts down cleanly)?

That is going to shutdown the operating system clean but not Kodi.
Disregard that as I was unaware that command was sending a shutdown command to Kodi before shutting down the system. That command still works fine as does this one…

kodi-send -a "ShutDown()"