Disable Shut Down Keys?

I'm running High Sierra, which still supports Control-Option-Command-Eject as a direct shut down without confirmation. I've hit the keys by accident more than once.

Is there a way to get KM to disable or intercept the shut down keyboard command? If not, is this something that Karabiner could do? Is there a terminal command to change the keys or add a confirmation dialog?

Thanks in advance for ideas.

Did you try the trigger called USB DEVICE Trigger? It allows me to put the Eject key into the box, and allows me to put those three modifiers as conditions too.

Triggering on that key is a different issue from preventing the OS from taking action on that key. At this point I'm not sure if this action eats the key or allows the OS to take action on it. I'll let you experiment, since I don't have your OS.

Yes, I did. It triggers whatever macro you like, then shuts down. Keyboard Maestro doesn't prevent the shut down command from taking effect.

Okay, that means KM triggers, but doesn't eat the trigger. There still might be a solution, I'll google it for a bit. But if I don't reply, it means I haven't found one.

I'm surprised that there isn't a terminal command for this sort of thing.

That's what I'm searching for. but 99% of the web pages talk about disabling the shutdown prompt, not disabling the ability to shutdown without the prompt. A subtle difference in wording but an opposite problem.

Thanks for the help.

I haven't used karabiner, but I'm 90% confident that it could not only grab that keystroke, but it would also eat it so that macOS doesn't receive it. Since you mentioned karabiner, I presume you have it. Did you try it?

Try reading this page:

http://hints.macworld.com/article.php?story=20040306121548561

It's a little too deep for me, but the guy seems to have solved a similar problem.

I may have found a simpler solution here:

I'm guessing that Control-Option-Command-Eject actually calls the shutdown utility and by following the advice on the above page this could work. NOTE: I was talking about the LAST post on the page, not the first two posts. Yup, the more I read that, the more I think it could work for you. That's such an easy thing to try out.

Thanks for finding that.

Karabiner Elements allows you to remap the Eject Key or disable it. Many (myself included) have used it for years without issue, some are uncomfortable installing low-level software. I'd suggest some research to decide your own level of comfort.

If it works for you, let us know.