Switch keypad mode to true. Unfortunately, this causes there to be a delay between hitting escape and the console closing (unless something else is pressed), but it's the only way to make arrow keys and stuff work