One of the trickier things to do on the HTC ONE. I've found if you don't press them exactly at the same time then it won't work. You end up either turning your phone off or your volume down. Which can be slightly annoying, especially when you try it like four or five times!
You can do that or if you are running Android 5.0 lollipop on your M8 yet, there is a snapshot option you can add to the quick settings dropdown to take a snapshot that way if you don't want to do the other method of holding down Home and Volume Down buttons.