This adds keydown handler for chat, map, and diary displays. Additionally, this can be used to handle malicious chat input without a delay by modifying the associated compile