Are you sure?
Long standing best practice is to immediately capture mod keys into a variable and then evaluate that as necessary for script purpose. Recognizing need to deal with possible use of caps lock, etc.
How exactly are you using this?
Yes. First step in the script is to capture the mod key value in a variable. To troubleshoot I'm watching the variable in the data viewer: when it works (after I reboot) it's displaying; when it fails it's null. Once it starts to fail it fails for every script where I capture the mod keys, and doesn't work again until a reboot.