A way to sense the caps lock?

Hello fine KM users. A quick question since I can’t find any existing solution. I want to sense the caps lock key and cancel a script’s execution if it’s on (because something has borked and I don’t want to wait for the script to end manually). Is there any way to do this in KM? If caps lock is on, cancel all macros, is my goal.

Whoops, I figured it out, with the help of an old post by JMichaelTXJun!

For the benefit of others, this is what I came up with.

For me it works with just the Device Key trigger, without anything more:


BTW, Keyboard Maestro has already a built-in global interrupt:

Hold down all modifier keys () and click the KM icon in the main menu bar.