I am trying to map a keyboard shortcut to put my computer to sleep.
I have successfully enabled my user to run the command without prompt.
and when I run
sudo systemctl suspend
via terminal it works perfectly.
However, when I run my new keyboard shortcut, it works perfectly and goes to sleep for 1 second before immediately resuming.