Fix weird arrow key bug on OSX.