Without this check, the other safest way was to constantly execute the relevant methods, which may lead to reduced performance given a sufficient number of events on the map. Then I remembered there was a keyboard script available, which showed how to check the state of every key.
Using this idea, I could simply check if any of the keys were pressed, and set a flag as needed, and then provide that as a convenient script call.