Bug 1071592 - Fix intermittent failure in test_keyboard.py