Crash in menu key repeat handling
Reported by madmax
The following recording, where a key is used right after it was bound, crashes on Windows release mode. The reason is use of initialized data in the key repeat code due to local/global state mixup.