handle input event before collecting randomness