Fix key playback to handle sending the same keystroke consecutively