keyEvent integration test helper to simulate keydown, keypress etc.