Flush keys if focus is lost in getCharacterInput